note 112521 added to control-structures.goto

From: Date: Wed, 26 Jun 2013 03:43:03 +0000
Subject: note 112521 added to control-structures.goto
Groups: php.notes 
Request: Send a blank email to php-notes+get-195353@lists.php.net to get a copy of this message
Now that I have found goto (not been at PHP to long) I can eliminate a bunch of IFs. I have about 12 to do to get to dofinal. <?php do stuff .... set if errorr $err=true //replace with goto dofinal; if(!$err) { do stuff .... set if errorr $err=true //replace with goto dofinal; } if(!$err) { do stuff .... set if errorr $err=true //replace with goto dofinal; } dofinal: do the common end script stuff ?> ---- Server IP: 69.147.83.199 Probable Submitter: 108.173.181.110 ---- Manual Page -- http://php.net/manual/en/control-structures.goto.php Edit -- https://master.php.net/note/edit/112521 Del: integrated -- https://master.php.net/note/delete/112521/integrated Del: useless -- https://master.php.net/note/delete/112521/useless Del: bad code -- https://master.php.net/note/delete/112521/bad+code Del: spam -- https://master.php.net/note/delete/112521/spam Del: non-english -- https://master.php.net/note/delete/112521/non-english Del: in docs -- https://master.php.net/note/delete/112521/in+docs Del: other reasons-- https://master.php.net/note/delete/112521 Reject -- https://master.php.net/note/reject/112521 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#195353) next »