note 87537 added to control-structures.switch

From: Date: Tue, 09 Dec 2008 16:06:43 +0000
Subject: note 87537 added to control-structures.switch
Groups: php.notes 
Request: Send a blank email to php-notes+get-147954@lists.php.net to get a copy of this message
As follow-up to ben dot lancaster at holler dot co dot uk's post: 'continue' ends the switch, not the case, just as it would with any other flow control. Think of it as putting the execution pointer right before the ending accolade (that is, the }) because that is essentially what happens. In the case of a for loop, this would cause the iteration clause to execute, and if applicable, the loop to begin again. However, switches do not loop, which is why (as noted above, in the manual!) a continue statement essentially acts as a break when within a switch. ---- Server IP: 66.207.199.35 Probable Submitter: 208.97.102.195 ---- Manual Page -- http://www.php.net/manual/en/control-structures.switch.php Edit -- https://master.php.net/note/edit/87537 Del: integrated -- https://master.php.net/note/delete/87537/integrated Del: useless -- https://master.php.net/note/delete/87537/useless Del: bad code -- https://master.php.net/note/delete/87537/bad+code Del: spam -- https://master.php.net/note/delete/87537/spam Del: non-english -- https://master.php.net/note/delete/87537/non-english Del: in docs -- https://master.php.net/note/delete/87537/in+docs Del: other reasons-- https://master.php.net/note/delete/87537 Reject -- https://master.php.net/note/reject/87537 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#147954) next »