ID: 14240
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: *General Issues
Operating System: Linux RedHat 7.1
PHP Version: 4.0.6
New Comment:
This prints "12" for me, which is what I would expect. A string evaluates to 0 upon
conversion to an integer. You should use === to check for both type and value.
Derick
Previous Comments:
------------------------------------------------------------------------
[2001-11-26 15:32:57] [EMAIL PROTECTED]
$foo = "foo";
if ( "foo" == 0 )
{ echo "1"; }
if ( $foo == 0 )
{ echo "2"; }
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=14240&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]