0v1.ro

(zero V unu)

PHP switch case after default works normally

When you put the a case block after the default block the switch will work normally and fallback to the default only after testing all cases.
The documentation doesn’t specify this directly, but there is a note with an example.
Another thing worth mentioning is that switch does loose comparisons, so be careful about 0, false values

Test yourself on iodine.com