From:             
Operating system: Windows XP
PHP version:      Irrelevant
Package:          Variables related
Bug Type:         Bug
Bug description:ELSEIF/ELSE IF doesn't work

Description:
------------
$x = 0;
$y = "some_string";

if( $x == 2 ) {
        echo "X = 2.<br/>";
        echo "Inner first IF";
} elseif ( $x == $y ) {
        echo "We are at the elseif condition.";
} else {
        echo "I don't know what's X value.";
}

Test script:
---------------
1st - That's my first time using bug report on php.net.
2nd - I'm brazilia(sorry my english).
3rd - I don't know I'm using the correct channel to report this.

I used WAMPServer2.1 to discover this bug.
The current PHP version used on used WAMPServer2.1 is 5.3.5.

This prints "We are at the elseif condition.".
The same happens if the $y value is false.

Expected result:
----------------
Expected result would be: "I don't know what's X value.".

Actual result:
--------------
Actual result would be: "I don't know what's X value.".

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

Reply via email to