note 109742 added to control-structures.switch
| From: | Anonymous | Date: | Wed, 15 Aug 2012 22:33:04 +0000 |
| Subject: | note 109742 added to control-structures.switch | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-190092@lists.php.net to get a copy of this message | ||
Regarding [Anonymous 27-Mar-2012 11:34]: 1 and any greater integer is taken as true, so of course
for all loops every case is executed, as it isn't stopped after first case with
"break;". Output is from test_1 to test_9.
----
Server IP: 69.147.83.197
Probable Submitter: 178.36.39.179
----
Manual Page -- http://www.php.net/manual/en/control-structures.switch.php
Edit -- https://master.php.net/note/edit/109742
Del: integrated -- https://master.php.net/note/delete/109742/integrated
Del: useless -- https://master.php.net/note/delete/109742/useless
Del: bad code -- https://master.php.net/note/delete/109742/bad+code
Del: spam -- https://master.php.net/note/delete/109742/spam
Del: non-english -- https://master.php.net/note/delete/109742/non-english
Del: in docs -- https://master.php.net/note/delete/109742/in+docs
Del: other reasons-- https://master.php.net/note/delete/109742
Reject -- https://master.php.net/note/reject/109742
Search -- https://master.php.net/manage/user-notes.php