note 99116 added to control-structures.alternative-syntax

From: Date: Wed, 28 Jul 2010 17:00:02 +0000
Subject: note 99116 added to control-structures.alternative-syntax
Groups: php.notes 
Request: Send a blank email to php-notes+get-171190@lists.php.net to get a copy of this message
@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 ---- Server IP: 69.147.83.197 Probable Submitter: 83.227.17.142 ---- Manual Page -- http://www.php.net/manual/en/control-structures.alternative-syntax.php Edit -- https://master.php.net/note/edit/99116 Del: integrated -- https://master.php.net/note/delete/99116/integrated Del: useless -- https://master.php.net/note/delete/99116/useless Del: bad code -- https://master.php.net/note/delete/99116/bad+code Del: spam -- https://master.php.net/note/delete/99116/spam Del: non-english -- https://master.php.net/note/delete/99116/non-english Del: in docs -- https://master.php.net/note/delete/99116/in+docs Del: other reasons-- https://master.php.net/note/delete/99116 Reject -- https://master.php.net/note/reject/99116 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#171190) next »