#23227 [Ver]: bug with ternary operator ? :
| From: | joey@php.net | Date: | Tue, 15 Apr 2003 16:02:29 +0000 |
| Subject: | #23227 [Ver]: bug with ternary operator ? : | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-37712@lists.php.net to get a copy of this message | ||
ID: 23227
Updated by: joey@php.net
Reported By: n dot manu at palina dot net
Status: Verified
Bug Type: Zend Engine 2 problem
Operating System: Windows NT or XP
PHP Version: 5CVS-2003-04-15 (dev)
New Comment:
This is a valid bug. I think Zeev said he knows a fix for this?
Previous Comments:
------------------------------------------------------------------------
[2003-04-15 11:02:27] joey@php.net
This is a valid bug. I think Zeev said he knows a fix for this?
------------------------------------------------------------------------
[2003-04-15 08:17:09] n dot manu at palina dot net
Following script :
<?
$test = 1;
if(((1 == $test)? true:false)){ //
echo 'ok';
}
else{ //
echo 'probleme';
}
?>
causes the following error :
Parse error: parse error, unexpected ')', expecting
T_PAAMAYIM_NEKUDOTAYIM in c:\program files\apache
group\apache\htdocs\test_weber.php on line 4
--------------
With one of the following lines, there is no error :
if (((1 == $test)?true :false)){ //
if (((1 == $test)?true: false)){ //
if (((1 == $test)?true : false)){ //
--------------
This error is not reproducible in with the latest release of php4
(4.3.2)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23227&edit=1