- 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.
<?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"!;
}