note 99116 deleted from control-structures.alternative-syntax by danbrown
| From: | danbrown@php.net | Date: | Fri, 30 Jul 2010 16:37:37 +0000 |
| Subject: | note 99116 deleted from control-structures.alternative-syntax by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-171250@lists.php.net to get a copy of this message | ||
Note Submitter: rstrz
----
@awls99 at gmail dot com
"ej at iconcept dot fo" did not make any mistake in his/hers code. The parentheses are not
obligatory and are only there to make your life as the developer easier. It's a matter of
coding standard. Personally I'm all crazy and do <?php $foo = (($bar == true) ?
'cool' : 'na thanks'); ?>. You may even write that statement without any
parentheses at all: <?php $foo = $bar == true ? 'cool' : 'na thanks'; ?>.
Still valid