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!"); default: echo "All checks passed"!; }
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.7
Parse error: syntax error, unexpected '!', expecting ',' or ';' in /in/Hcm9k on line 13
Process exited with code 255.

preferences:
171.03 ms | 1395 KiB | 36 Q