|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-10-06 11:10 UTC] nikic@php.net
-Status: Open
+Status: Not a bug
[2013-10-06 11:10 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 13:00:01 2025 UTC |
Description: ------------ array_search returns wrong last key (instead of false) if value it is 0 Test script: --------------- $arr = array( "ONE"=>1, "TWO"=>2, "THREE"=>3, "FOUR"=>4, "FIVE"=>5, "SIX"=>6, "SEVEN"=>7, "EIGHT"=>8, "NINE"=>9, "ZERO"=>0 ); var_dump(array_search('unknown', $arr)); Expected result: ---------------- bool(false) Actual result: -------------- string(4) "ZERO"