Adam Maccabee Trachtenberg wrote:
On Thu, 8 Jul 2004, Marc Richards wrote:
Are you saying PHP will never introduce an operator that doesn't already exist in a large number of other languages?
I certainly hope not. (Well, I guess === and !=== are exceptions to this statement.)
Compound Ternary operator:
$a = $b ?: $c;
You realize that ternary means it takes three arguments? It has nothing to do with question marks and colons. Your new "compound ternary" operator is really a "binary" operator.
maybe call it the Collapsed Ternary (the first two arguments being collapse into 1 because they are 'identical'*). document it under the tenary docs, that way you can effectively introduce the std concept first before showing the the PHP handy extra for all those blasted checks.
*sorry, my grasp of technical terminology is abysmal.
-adam
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php