|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-07-02 12:11 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 11:00:01 2025 UTC |
Description: ------------ Using array_search with "haystack" completly numeric and the first 16 digits identic a wrong key is returned. This does not occur if one character is in the "haystack" or if there is any difference in the first 16 digits. Reproduce code: --------------- <? $a = array (11 => "99999999999999999999999999", 57 => "11022625212002021111111111", 80 => "11022625212002021051765412"); print_r($a); $b = array_search ("11022625212002021051765412", $a); echo $b; ?> Expected result: ---------------- Array ( [11] => 99999999999999999999999999 [57] => 11022625212002021111111111 [80] => 11022625212002021051765412 ) 80 Actual result: -------------- Array ( [11] => 99999999999999999999999999 [57] => 11022625212002021111111111 [80] => 11022625212002021051765412 ) 57