|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-09-05 01:43 UTC] felipe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 19:00:01 2025 UTC |
Description: ------------ in_array is returning true for needles that are not in the haystack. The problem is with with large needles that are similar except for least significant digits. Yes, it does work correctly when you set strict to true in in_array, however I would expect this to work correctly with out it. Reproduce code: --------------- <?php $a = array('999999999999999999'); if(in_array('999999999999999990',$a)) { echo "true"; } ?> Expected result: ---------------- This should return nothing. Actual result: -------------- in_array returns true and the echo occurs.