note 87537 deleted from control-structures.switch by crell

From: Date: Wed, 29 Jun 2022 17:51:44 +0000
Subject: note 87537 deleted from control-structures.switch by crell
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-218663@lists.php.net to get a copy of this message
Note Submitter: Keil ---- 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.

« previous php.notes (#218663) next »