|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-04-28 00:18 UTC] rasmus@php.net
-Status: Open
+Status: Bogus
[2011-04-28 00:18 UTC] rasmus@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Mar 26 21:00:01 2026 UTC |
Description: ------------ The in_array function return true if the haystack have an element with value 0 Test script: --------------- if (in_array('something', array(0)) ) { echo 'something is in array'; } else { echo 'something is NOT in array'; } if (in_array('something', array(0, 'element1', 'element2')) ) { echo 'something is in array'; } else { echo 'something is NOT in array'; } Expected result: ---------------- something is NOT in array Actual result: -------------- something is in array