note 88288 added to reserved.constants
| From: | soywiz at gmail dot com | Date: | Mon, 19 Jan 2009 11:32:39 +0000 |
| Subject: | note 88288 added to reserved.constants | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-149440@lists.php.net to get a copy of this message | ||
Another way to determine PHP_INT_MIN:
define('PHP_INT_MIN', ~PHP_INT_MAX);
It should work always:
MAX for 8bit-signed: 01111111
MIN for 8bit-signed: 10000000
In 32 bits:
php -r"echo (int)base_convert(str_repeat('1', 31), 2, 10) - PHP_INT_MAX;"
0
echo ~(int)base_convert(str_repeat('1', 31), 2, 10);
-2147483648
----
Server IP: 69.147.83.197
Probable Submitter: 89.140.161.225
----
Manual Page -- http://www.php.net/manual/en/reserved.constants.php
Edit -- https://master.php.net/note/edit/88288
Del: integrated -- https://master.php.net/note/delete/88288/integrated
Del: useless -- https://master.php.net/note/delete/88288/useless
Del: bad code -- https://master.php.net/note/delete/88288/bad+code
Del: spam -- https://master.php.net/note/delete/88288/spam
Del: non-english -- https://master.php.net/note/delete/88288/non-english
Del: in docs -- https://master.php.net/note/delete/88288/in+docs
Del: other reasons-- https://master.php.net/note/delete/88288
Reject -- https://master.php.net/note/reject/88288
Search -- https://master.php.net/manage/user-notes.php