3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = 'ABC123'; switch (false) { case isset($var): throw new Exception("Not set!"); case $var: throw new Exception("False!"); case isstring($var): throw new Exception("Not a string!"); case default: echo "All checks passed"!; }
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.7
Parse error: syntax error, unexpected 'default' (T_DEFAULT) in /in/0ND2X on line 12
Process exited with code 255.

preferences:
176.94 ms | 1395 KiB | 36 Q