3v4l.org

run code in 500+ PHP versions simultaneously
<?php switch ($four) { ; // only one valid //; Uncomment for a parse error case 4: echo 'four'; break; default; echo 'not four'; }
Output for 8.5.7 - 8.5.8
Deprecated: Case statements followed by a semicolon (;) are deprecated, use a colon (:) instead in /in/n9S9r on line 7 Warning: Undefined variable $four in /in/n9S9r on line 6 not four
Output for 8.2.32, 8.3.5 - 8.3.32, 8.4.9 - 8.4.23
Warning: Undefined variable $four in /in/n9S9r on line 6 not four

preferences:
45.19 ms | 522 KiB | 4 Q