note 34716 added to control-structures.while

From: Date: Tue, 05 Aug 2003 03:07:39 +0000
Subject: note 34716 added to control-structures.while
Groups: php.notes 
Request: Send a blank email to php-notes+get-53370@lists.php.net to get a copy of this message
Warhog's method of simplifying complex if () chains: while (TRUE) { break; } has a subtle issue: if you don't break, you loop indefinitely. Better to use: do { // whatever break; } while (0); Never loops, gets you out easily. ---- Manual Page -- http://www.php.net/manual/en/control-structures.while.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34716 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34716&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34716&report=yes

« previous php.notes (#53370) next »