ID:               45949
 Updated by:       [EMAIL PROTECTED]
 Reported By:      pengxin at itsail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Arrays related
 Operating System: WinXP
 PHP Version:      5.2.6
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Use the third parameter.

http://docs.php.net/in-array


Previous Comments:
------------------------------------------------------------------------

[2008-08-29 16:26:30] pengxin at itsail dot com

Description:
------------
Well. why 0(it's int, NOT '0' with string) in any string array? I think
it shouldn't be.

Reproduce code:
---------------
<?php
if (in_array(0, array('All'))) {
        echo 'a';
} else {
        echo 'b';
}
?>

Expected result:
----------------
it outputs "b", and I think it should be "a". Because 0 and "0" are
different.



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=45949&edit=1

Reply via email to