Re: Why PHP sucks - farce or is there a bit of truth?
| From: | Robert Cummings | Date: | Fri, 18 Oct 2013 03:45:11 +0000 |
| Subject: | Re: Why PHP sucks - farce or is there a bit of truth? | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-322308@lists.php.net to get a copy of this message | ||
On 13-10-17 09:05 PM, Tim-Hinnerk Heuer wrote:
a - b = (+a) + (-b) = (-b) + (+a) The argument is about the ternary operator though: #include<stdio.h> main() {Why not? Both are valid interpretations. if you don't want ambiguity, clarify the expression with parenthesis (as you've shown in a subsequent post). One can't hinge the entire argument of whether PHP sucks on a right-left/left-right interpretation of the ternary operator, yet this is what you've chosen to focus on. Let's also put things in perspective, when a language reaches an audience in the millions SOMEONE will have something to whine about... and it just so happens some people like to whine loudly like a baby with a soiled nappie. :) Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized.int a = 1; printf("%s", (a == 1) ? "one" : (a == 2) ? "two" : "three");} in C outputs:So, why is PHP different?one