#23227 [Com]: bug with ternary operator ? :
| From: | colons at arebad dot com | Date: | Tue, 15 Apr 2003 19:09:04 +0000 |
| Subject: | #23227 [Com]: bug with ternary operator ? : | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-37718@lists.php.net to get a copy of this message | ||
ID: 23227
Comment by: colons at arebad dot com
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:
I am thinking that if you edit Zend/zend_language_scanner.l on line 486
where it reads:
NAMESPACE_NAME ({LABEL}":")+{LABEL}
and just put it into
NAMESPACE_NAME {LABEL}
then problem will be getting fixed up.
Previous Comments:
------------------------------------------------------------------------
[2003-04-15 11:02:29] joey@php.net
This is a valid bug. I think Zeev said he knows a fix for this?
------------------------------------------------------------------------
[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