

Did you know that each integer in a PHP array takes 68 bytes of storage? - nickb
http://pankaj-k.net/weblog/2008/03/did_you_know_that_each_integer.html

======
aston
Kinda misleading title. It's not the int, it's the int _in an array._ Or, more
precisely, in a hash table, since PHP doesn't actually have strictly-
numerically-indexed vectors.

------
marketer
Try opening up a python interpreter and running help(int). You'll notice
something surprising -- there are over 50 methods available for ints. This
ranges from all the basic math operations, shifts, boolean operations, and
high precision math functions.

The actual data itself is small, either 4 or 8 bytes, depending on the
architecture. Now, depending on the language php was written in (I believe it
is C), the other ~60 bytes is probably has metadata associated with all the
operations.

------
nwinter
Interestingly enough, as far as I know, Python ints and floats each take up a
cumulative 20 bytes.

------
lst
I hardly recommend using PHP for number crunching to all of my competitors.

