Edit report at https://bugs.php.net/bug.php?id=60672&edit=1
ID: 60672
User updated by: danillo dot paiva dot toledo at gmail dot com
Reported by: danillo dot paiva dot toledo at gmail dot com
Summary: ELSEIF/ELSE IF doesn't work
Status: Open
Type: Bug
Package: Variables related
Operating System: Windows XP
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
$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.";
}
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.
Previous Comments:
------------------------------------------------------------------------
[2012-01-06 16:11:19] danillo dot paiva dot toledo at gmail dot com
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 this bug report at https://bugs.php.net/bug.php?id=60672&edit=1