#38407 [Opn->Bgs]: If statement acts weird
ID: 38407
Updated by: tony2001@php.net
Reported By: pear dot 20 dot fab at spamgourmet dot com
-Status: Open
+Status: Bogus
Bug Type: *General Issues
Operating System: FC5
PHP Version: 5.1.4
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
var_dump(0 == 'string');
var_dump(0 === 'string');
Previous Comments:
------------------------------------------------------------------------
[2006-08-10 09:22:29] pear dot 20 dot fab at spamgourmet dot com
Description:
------------
The IF statement acts weird ... just have a look.
Reproduce code:
---------------
<?php
if(0 == 'std') {
echo "are you kidding?";
}
else{
echo "alright";
}
?>
Expected result:
----------------
alright
Actual result:
--------------
are you kidding?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38407&edit=1
Thread (3 messages)