Bug #16621 Updated: different ?: operator association then in C

From: Date: Mon, 15 Apr 2002 14:28:05 +0000
Subject: Bug #16621 Updated: different ?: operator association then in C
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-5028@lists.php.net to get a copy of this message
ID: 16621 Updated by: pete@ana.sk -Summary: different ?: operator precedence then in C Reported By: pete@ana.sk Status: Open Bug Type: Feature/Change Request Operating System: linux PHP Version: 4.1.2 New Comment: Maybe its intentional, but i think that it would be best to have some consitence with C. 1 ? "A" : 1 ? "B" : "C" return "A" in C (since ?: is associated from right to left) but it returns "B" in PHP (since its left to right). Previous Comments: ------------------------------------------------------------------------ [2002-04-15 10:00:43] pete@ana.sk Maybe its intentional, but i think that it would be best to have some consitence with C. 1 ? "A" : 1 ? "B" : "C" return "A" in C (since ?: is associated from right to left) but it returns "B" in PHP (since its left to right). ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16621&edit=1

« previous php.bugs (#5028) next »