note 74767 added to function.intval

From: Date: Thu, 26 Apr 2007 17:42:41 +0000
Subject: note 74767 added to function.intval
Groups: php.notes 
Request: Send a blank email to php-notes+get-125896@lists.php.net to get a copy of this message
Indeed, as stated by David, 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 ---- Server IP: 69.147.83.197 Probable Submitter: 201.6.136.253 ---- Manual Page -- http://www.php.net/manual/en/function.intval.php Edit -- https://master.php.net/note/edit/74767 Del: integrated -- https://master.php.net/note/delete/74767/integrated Del: useless -- https://master.php.net/note/delete/74767/useless Del: bad code -- https://master.php.net/note/delete/74767/bad+code Del: spam -- https://master.php.net/note/delete/74767/spam Del: non-english -- https://master.php.net/note/delete/74767/non-english Del: in docs -- https://master.php.net/note/delete/74767/in+docs Del: other reasons-- https://master.php.net/note/delete/74767 Reject -- https://master.php.net/note/reject/74767 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#125896) next »