ID: 30036 Updated by: [EMAIL PROTECTED] Reported By: marek at lewczuk dot com -Status: Open +Status: Bogus Bug Type: Arrays related Operating System: Windows PHP Version: 4.3.8 New Comment:
Use the 3rd optional parameter (for strict search) which makes in_array() to check the type too. NOT a bug. Previous Comments: ------------------------------------------------------------------------ [2004-09-09 10:04:27] marek at lewczuk dot com Description: ------------ When you have an array with boolean values, then in_array will always return true. Reproduce code: --------------- print in_array("test it", array(true, true, "sdsd" => true)) Expected result: ---------------- should return false Actual result: -------------- true ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30036&edit=1