From:             me at my dot house
Operating system: Debian
PHP version:      4.3.2
PHP Bug Type:     Performance problem
Bug description:  in_array produces true when bool true is in haystack

Description:
------------
If the haystack contains the boolean true, in_array returns true!!
Check this (PHP 4.2.3-8 debian package) :



Reproduce code:
---------------
<?php
$r=array("fzsgsdgsd","reazrazr","rezarzearzae",true);
$ret=in_array("tsuser_id",$r);

print $ret;

}

?> 

Expected result:
----------------
false

Actual result:
--------------
true

-- 
Edit bug report at http://bugs.php.net/?id=26232&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26232&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26232&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26232&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26232&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26232&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=26232&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26232&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26232&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26232&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26232&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26232&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26232&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26232&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26232&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26232&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26232&r=float

Reply via email to