note 9709 deleted from break by torben

From: Date: Mon, 20 Nov 2000 19:05:35 +0000
Subject: note 9709 deleted from break by torben
Groups: php.notes 
Request: Send a blank email to php-notes+get-7924@lists.php.net to get a copy of this message
No offense intended, but check the above code segment for convolution. First, a "do { ... } while(0);" loop executes the bracketed code exactly once. This would be equivalent to just writing the bracketed code inline. Why waste the parsing and processing cycles? Second, there is no such thing as "break[ing] out of an if [statement]". The key word 'break' only applies to the bounding iterator. In effect, you've provided a bogus iterator just to give the 'break' something to break out of. This is bad coding practice and not something to teach the newbies!

« previous php.notes (#7924) next »