note 90044 added to control-structures.switch
| From: | m dot skoric at web dot de | Date: | Thu, 02 Apr 2009 21:08:13 +0000 |
| Subject: | note 90044 added to control-structures.switch | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-152775@lists.php.net to get a copy of this message | ||
In reply to mar dot czapla at gmail dot com
<?php
/* script 1 */
$foo = "not a number";
switch(false)
{
case "1": { $foo = "1"; break; }
case "2": { $foo = "2"; break; }
default: { $foo = "0"; }
}
...omitted
?>
your code doesn't produce the output in release 5.2.8 as you mentioned.
Output is 001.
The first to switch-case stmts end in the default block!
Which php version do you have?
----
Server IP: 212.124.37.9
Probable Submitter: 82.83.254.150
----
Manual Page -- http://www.php.net/manual/en/control-structures.switch.php
Edit -- https://master.php.net/note/edit/90044
Del: integrated -- https://master.php.net/note/delete/90044/integrated
Del: useless -- https://master.php.net/note/delete/90044/useless
Del: bad code -- https://master.php.net/note/delete/90044/bad+code
Del: spam -- https://master.php.net/note/delete/90044/spam
Del: non-english -- https://master.php.net/note/delete/90044/non-english
Del: in docs -- https://master.php.net/note/delete/90044/in+docs
Del: other reasons-- https://master.php.net/note/delete/90044
Reject -- https://master.php.net/note/reject/90044
Search -- https://master.php.net/manage/user-notes.php