Edit report at https://bugs.php.net/bug.php?id=40597&edit=1
ID: 40597
Comment by: php dot 20 dot rinogo at xoxy dot net
Reported by: mail957253 at lemurtastic dot com
Summary: FILTER_VALIDATE_INT limited to system's signed
integer size
Status: Not a bug
Type: Bug
Package: Filter related
Operating System: Windows XP SP2
PHP Version: 5.2.1
Assigned To: pajoye
Block user comment: N
Private report: N
New Comment:
I'm with the OP. I'm migrating an app from HostMonster shared hosting to a
WiredTree VPS.
On HM, filter_var runs as expected (as stated above). On WiredTree, it returns
false.
So, at BEST, PHP's behavior is inconsistent.
Previous Comments:
------------------------------------------------------------------------
[2007-02-22 22:48:08] [email protected]
It returns a PHP integer which is limited to 32bits.
If you like to get a string containing a big integer, you can use the sanitize
rule.
Once PHP has 64bits integer support, it will be available in filter as well.
Not a bug > bogus.
------------------------------------------------------------------------
[2007-02-22 22:36:02] mail957253 at lemurtastic dot com
Description:
------------
FILTER_VALIDATE_INT should validate anything that normal people consider an
integer as such, rather than being limited to what my computer can store in 32
bits.
Reproduce code:
---------------
filter_var('2147483648', FILTER_VALIDATE_INT);
Expected result:
----------------
returns '2147483648'
Actual result:
--------------
returns FALSE
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=40597&edit=1