Bug #15201: ('foo'==0) => equal ?

From: Date: Thu, 24 Jan 2002 11:15:26 +0000
Subject: Bug #15201: ('foo'==0) => equal ?
Groups: php.dev 
Request: Send a blank email to php-dev+get-77982@lists.php.net to get a copy of this message
From: alberty@neptunelabs.de Operating system: i688-gnu-linux PHP version: 4.0CVS-2002-01-24 PHP Bug Type: Variables related Bug description: ('foo'==0) => equal ? A simple condition with a strange result: <?php $a='foo'; $b=0; if ($a==$b) echo 'equal'; else echo 'not equal'; ?> result: $a and $b is equal, but if $b unequal zero the condition results 'not equal' This is not really rationally. Is the problem the automatic type casting? Regards, Steve -- Edit bug report at: http://bugs.php.net/?id=15201&edit=1

« previous php.dev (#77982) next »