Mike Robinson wrote:

Perlish or not could not be a real reason for adding or not adding a feature in PHP. The important thing here is if it
fits to the language concept or not.


Indeed, and IMHO it does, much like

($a==$b)?...

fits in quite well as an alternative to

if ($a==$b)...

It is an alternative syntax that makes things more readable
and easier to use. Not an awful lot of magic, sexiness, or
character savings involved.

The ternary conditional operator is not an alternative to
if-then-else construct because it always evaluates to some boolean while the latter doesn't evalute to anything because it's just control of execution structure.


As for discussed array syntaxes they always evaluate to the same result given the same input values. So they're equal.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to