If no case label matches the value of expression, and there is no default case, no statements execute.If no case label matches the value of expression, then the default case is picked, and its statements execute.PHP continues to execute the statements until the end of the switch block, or the first time it sees a break statement. Now the entire switch statement is complete (no further statements are executed.) Only when a case statement is found with a value that matches the value of the switch expression does PHP begin to execute the statements.The statements execute until a break statement is encountered.The first label that matches has its statementList execute.The labels after each case are inspected one by one, starting with the first. This is the time when it accepts true instead of any variable value.
0 Comments
Leave a Reply. |