#23227 [NEW]: bug with ternary operator ? :

From: Date: Tue, 15 Apr 2003 13:17:09 +0000
Subject: #23227 [NEW]: bug with ternary operator ? :
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-37707@lists.php.net to get a copy of this message
From: n dot manu at palina dot net Operating system: Windows NT or XP PHP version: 5CVS-2003-04-15 (dev) PHP Bug Type: Zend Engine 2 problem Bug description: bug with ternary operator ? : 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 bug report at http://bugs.php.net/?id=23227&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=23227&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=23227&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=23227&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=23227&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=23227&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=23227&r=support Expected behavior: http://bugs.php.net/fix.php?id=23227&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=23227&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=23227&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=23227&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23227&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=23227&r=dst IIS Stability: http://bugs.php.net/fix.php?id=23227&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=23227&r=gnused

« previous php.bugs (#37707) next »