note 90377 added to control-structures.switch

From: Date: Sun, 19 Apr 2009 01:25:38 +0000
Subject: note 90377 added to control-structures.switch
Groups: php.notes 
Request: Send a blank email to php-notes+get-153476@lists.php.net to get a copy of this message
I found this page when I was trying to remember if the PHP switch statement allowed expressions as well as literals as the predicate of a case clause. Logically it should, but this isn't made clear in the documentation above or, for that matter, in O'Reilly's 'Programming PHP'. Having written C for some 20 years, I'd stuck to literals. Now I realise that I can vastly simplify some spaghetti code :-) ---- Server IP: 92.48.74.199 Probable Submitter: 86.137.34.45 ---- Manual Page -- http://www.php.net/manual/en/control-structures.switch.php Edit -- https://master.php.net/note/edit/90377 Del: integrated -- https://master.php.net/note/delete/90377/integrated Del: useless -- https://master.php.net/note/delete/90377/useless Del: bad code -- https://master.php.net/note/delete/90377/bad+code Del: spam -- https://master.php.net/note/delete/90377/spam Del: non-english -- https://master.php.net/note/delete/90377/non-english Del: in docs -- https://master.php.net/note/delete/90377/in+docs Del: other reasons-- https://master.php.net/note/delete/90377 Reject -- https://master.php.net/note/reject/90377 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#153476) next »