|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-11-21 15:10 UTC] jay@php.net
[2003-11-24 02:54 UTC] kouber at saparev dot com
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 22:00:02 2025 UTC |
Description: ------------ is_numeric() always returns false for strings with more than 308 characters, even if all of them are digits. 308 = 255 + 63 = 2^8-1 + 2^6-1 Reproduce code: --------------- <? $s = str_repeat('6', 309); var_dump($s); var_dump(is_numeric($s)); ?> Expected result: ---------------- string(309) "666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666" bool(true) Actual result: -------------- string(309) "666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666" bool(false)