Bug #14605: compare string with integer 0 returns true

From: Date: Wed, 19 Dec 2001 16:11:10 +0000
Subject: Bug #14605: compare string with integer 0 returns true
Groups: php.dev 
Request: Send a blank email to php-dev+get-74424@lists.php.net to get a copy of this message
From: adrian@ciutureanu.ro Operating system: Linux PHP version: 4.1.0 PHP Bug Type: Scripting Engine problem Bug description: compare string with integer 0 returns true <?php $i = 0; $s = 'the string'; if($i == $s) { echo "'$s' == $i"; } else { echo "'$s' != $i"; } ?> // This outputs 'the string' == 0 -- Edit bug report at: http://bugs.php.net/?id=14605&edit=1

« previous php.dev (#74424) next »