note 89172 added to control-structures.goto

From: Date: Wed, 25 Feb 2009 10:51:47 +0000
Subject: note 89172 added to control-structures.goto
Groups: php.notes 
Request: Send a blank email to php-notes+get-151096@lists.php.net to get a copy of this message
As in every language where the goto instruction is implemented, the same advice comes : please, never use gotos :) There is always a better way to do what you want to do when you use a goto. If you want to skip a block, use functions and if/else... That said, it's a good thing PHP implements goto for compatibility with very old-school programmers. ---- Server IP: 89.31.146.176 Probable Submitter: 62.160.42.235 ---- Manual Page -- http://www.php.net/manual/en/control-structures.goto.php Edit -- https://master.php.net/note/edit/89172 Del: integrated -- https://master.php.net/note/delete/89172/integrated Del: useless -- https://master.php.net/note/delete/89172/useless Del: bad code -- https://master.php.net/note/delete/89172/bad+code Del: spam -- https://master.php.net/note/delete/89172/spam Del: non-english -- https://master.php.net/note/delete/89172/non-english Del: in docs -- https://master.php.net/note/delete/89172/in+docs Del: other reasons-- https://master.php.net/note/delete/89172 Reject -- https://master.php.net/note/reject/89172 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#151096) next »