3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { protected static function bar($arg) { return $arg * 1; } public static function test() { $foo = 'e'; case ($foo) { case 'a': $b = 1; break; case 'b': $b = 2; break; case 'c': $b = 3; break; case 'd': $b = 4; break; case 'e': $b = 5; break; } var_dump($b); } } Foo::test();
Output for 5.4.0 - 5.5.12
Parse error: syntax error, unexpected 'case' (T_CASE) in /in/lqq6f on line 14
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_CASE in /in/lqq6f on line 14
Process exited with code 255.