3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $foo = 'foo2'; switch ($foo) { case 'foo': echo "first foo\n"; break; case 'foo': echo "second foo\n";break; default: echo "first default\n";break; default: echo "second default\n";break; }
based on UOr0C
Output for 7.0.0 - 7.0.7
Fatal error: Switch statements may only contain one default clause in /in/u9cGI on line 11
Process exited with code 255.
Output for hhvm-3.12.0
Fatal error: Switch statements may only contain one default: clause in /in/u9cGI on line 12
Process exited with code 255.
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.3.0 - 5.6.28
second default