note 74767 deleted from function.intval by cmb
| From: | cmb@php.net | Date: | Sun, 16 Feb 2020 13:52:18 +0000 |
| Subject: | note 74767 deleted from function.intval by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-214152@lists.php.net to get a copy of this message | ||
Note Submitter: aryel at redtwilightNO dot comSPAM dot brNOT
----
Since integers are stored on multiple bytes in the memory in binary format, once an signed long
integer reaches the maximum value of 2147483646 (which is the maximum value that 8 bits of memory,
size of a long int, can store, binary-wise), atleast on C/C++ the number starts to roll back, going
gradually to ...45, ...45 and eventually reaching a negative value. Some REALLY large values will
return -1, probably because PHP simply rejects the number, though I'm not sure why.
For further info:
http://www.rwc.uc.edu/koehler/comath/13.html