note 110319 deleted from language.expressions by googleguy

From: Date: Wed, 10 Oct 2012 20:34:04 +0000
Subject: note 110319 deleted from language.expressions by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-191241@lists.php.net to get a copy of this message
Note Submitter: Anonymouse ---- 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.

« previous php.notes (#191241) next »