From: [EMAIL PROTECTED]
Operating system: Solaris
PHP version: 4.0.6
PHP Bug Type: Arrays related
Bug description: array_search always skips first element of array
I think i've discovered a problem with array_search. If I have an array,
say
$arr = Array("one","two","a");
then I try
$retVal = array_search("one",$arr);
it will return false, however the other two elements are fine.
It seems array_search just ignores the first element in the array, I can
search the rest of the array fine, just not the first element. If I put
another item at the start I can find "one" fine.
in_array works fine, it's just array_search that fails
--
Edit bug report at http://bugs.php.net/?id=16146&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=16146&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=16146&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=16146&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=16146&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16146&r=support
Expected behavior: http://bugs.php.net/fix.php?id=16146&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16146&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16146&r=submittedtwice