I am debugging some code for the client and found the following syntax:
switch ($i) { case 0; echo "i equals 0"; break; case 1; echo "i equals 1"; break; case 2; echo "i equals 2"; break; }
Case statements end in semicolonies, not colons. Turns out this compiles, but is this legal? I have never seen this syntax before.
Yarin source share