From:             
Operating system: Windows XP SP3
PHP version:      Irrelevant
Package:          Scripting Engine problem
Bug Type:         Bug
Bug description:(integer) 0 == '_'

Description:
------------
When testing the expression of integer "0" (zero) equals "_" (underscore),
the 

result of the expression is true, when it should be false.



I could not select the proper PHP version number because it was not
listed:



C:>php -v

PHP 5.3.2 (cli) (built: Mar  3 2010 20:36:54)

Copyright (c) 1997-2010 The PHP Group

Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

    with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans

Test script:
---------------
<?php



    $index = 0;



    if ( $index == '_' )

        echo "Bug found.\n";



    else

        echo "No bug found.\n";

Expected result:
----------------
No bug found.

Actual result:
--------------
Bug found.

-- 
Edit bug report at http://bugs.php.net/bug.php?id=53487&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=53487&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=53487&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=53487&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=53487&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=53487&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=53487&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=53487&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=53487&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=53487&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=53487&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=53487&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=53487&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=53487&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=53487&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=53487&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=53487&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=53487&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=53487&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=53487&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=53487&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=53487&r=mysqlcfg

Reply via email to