note 120130 added to reserved.constants

From: Date: Tue, 08 Nov 2016 05:27:11 +0000
Subject: note 120130 added to reserved.constants
Groups: php.notes 
Request: Send a blank email to php-notes+get-207046@lists.php.net to get a copy of this message
I discovered that, at least on my setup, the highest precise integer that can be precisely represented is different than the value of PHP_INT_MAX. On my WAMP setup (W2K12R2x64, Apache 2.4, PHP 7.x), PHP INT_MAX is 9,223,372,036,854,775,807, but the true highest precise integer I could represent is 9,007,199,254,740,991 (2^53-1). I discovered it manually, at first because I wondered why my integers were rounded at even values. Testing manually where rounding stops, when I discovered the value, I searched for it on Google, just to find out it was also the "max_safe_integer" value in Javascript. Don't know the exact relation, but since I needed exact values, I limited my script's input values to 2^53-1 instead of PHP_INT_MAX. If it can be useful to someone else... ---- Server IP: 72.52.91.14 Probable Submitter: 69.70.40.98 ---- Manual Page -- http://php.net/manual/en/reserved.constants.php Edit -- https://master.php.net/note/edit/120130 Del: integrated -- https://master.php.net/note/delete/120130/integrated Del: useless -- https://master.php.net/note/delete/120130/useless Del: bad code -- https://master.php.net/note/delete/120130/bad+code Del: spam -- https://master.php.net/note/delete/120130/spam Del: non-english -- https://master.php.net/note/delete/120130/non-english Del: in docs -- https://master.php.net/note/delete/120130/in+docs Del: other reasons-- https://master.php.net/note/delete/120130 Reject -- https://master.php.net/note/reject/120130 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#207046) next »