note 105408 added to control-structures.switch

From: Date: Tue, 16 Aug 2011 01:16:48 +0000
Subject: note 105408 added to control-structures.switch
Groups: php.notes 
Request: Send a blank email to php-notes+get-182501@lists.php.net to get a copy of this message
A quick note: ending "case ..." with ";" appears to work. $a = 'foo'; switch($a) { case 'bar'; echo 'Stopped at bar.'; break; case 'foo'; echo 'Stopped at foo.'; break; default; echo 'Fell to default.'; } This is a "Well, that's interesting" note; not an encouragement to actually use this. ---- Server IP: 69.147.83.197 Probable Submitter: 202.7.189.118 ---- Manual Page -- http://www.php.net/manual/en/control-structures.switch.php Edit -- https://master.php.net/note/edit/105408 Del: integrated -- https://master.php.net/note/delete/105408/integrated Del: useless -- https://master.php.net/note/delete/105408/useless Del: bad code -- https://master.php.net/note/delete/105408/bad+code Del: spam -- https://master.php.net/note/delete/105408/spam Del: non-english -- https://master.php.net/note/delete/105408/non-english Del: in docs -- https://master.php.net/note/delete/105408/in+docs Del: other reasons-- https://master.php.net/note/delete/105408 Reject -- https://master.php.net/note/reject/105408 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#182501) next »