note 110319 added to language.expressions
| From: | Anonymouse | Date: | Wed, 10 Oct 2012 12:12:24 +0000 |
| Subject: | note 110319 added to language.expressions | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-191233@lists.php.net to get a copy of this message | ||
To phvandeberghe
Your example has nothing to do with the operator "*". Your code generates that output
because switch(x) finds the first case label that =='s x. That's "case 0:" in
your example, because "*" == 0.
The switch then executes all following cases, unless the control flow is changed by a break,
continue, goto or return.
See
http://www.php.net/manual/en/language.operators.comparison.php
and
http://www.php.net/manual/en/control-structures.switch.php
RTFM.
----
Server IP: 69.147.83.199
Probable Submitter: 27.99.20.143
----
Manual Page -- http://www.php.net/manual/en/language.expressions.php
Edit -- https://master.php.net/note/edit/110319
Del: integrated -- https://master.php.net/note/delete/110319/integrated
Del: useless -- https://master.php.net/note/delete/110319/useless
Del: bad code -- https://master.php.net/note/delete/110319/bad+code
Del: spam -- https://master.php.net/note/delete/110319/spam
Del: non-english -- https://master.php.net/note/delete/110319/non-english
Del: in docs -- https://master.php.net/note/delete/110319/in+docs
Del: other reasons-- https://master.php.net/note/delete/110319
Reject -- https://master.php.net/note/reject/110319
Search -- https://master.php.net/manage/user-notes.php