ID: 40247 Updated by: [EMAIL PROTECTED] Reported By: y1ngf4n at hotmail dot com -Status: Open +Status: Bogus Bug Type: Arrays related Operating System: Windows XP PHP Version: 5.2.0 New Comment:
(int)0 == (int)'b' That's why the last argument of array_search() is there. "If the optional third parameter strict is set to TRUE then the array_search() will also check the types of the needle in the haystack." Previous Comments: ------------------------------------------------------------------------ [2007-01-26 10:06:11] y1ngf4n at hotmail dot com Description: ------------ seems like a very unique case, since array_merge(range('a','z'),range('0','9')) will produce correct result Reproduce code: --------------- $test = array_merge(range('0','9'),range('a','z')); var_dump(array_search('b',$test)); Expected result: ---------------- 11 Actual result: -------------- 0 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40247&edit=1