php-developer-list | 2001122

[PHP-DEV] Bug #14605: compare string with integer 0 returns true From: adrian <email protected>
Date: 12/19/01

From: adrian <email protected>
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

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>