ID: 22611 Updated by: [EMAIL PROTECTED] Reported By: pts+phpbug at math dot bme dot hu -Status: Open +Status: Bogus Bug Type: Zend Engine 2 problem Operating System: Linux PHP Version: 4.3.1 New Comment:
This looks really weird, but it's by design. In PHP "?" have left associativity in contrast to other languages such as perl in which they have right associativity. See also http://www.php.net/manual/en/language.operators.php http://www.perldoc.com/perl5.8.0/pod/perlop.html Previous Comments: ------------------------------------------------------------------------ [2003-03-08 13:46:47] pts+phpbug at math dot bme dot hu <?php echo 1 ? 2 : 3 ? 4 : 5; # ^^^ should echo `2', but echoes `4' in PHP 4.3.1 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22611&edit=1