3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function test($input) { switch ($input) { case 'foo': echo 'foo'; break; case 'bar': echo 'bar'; break; default: echo 'default'; case 'baz': echo 'baz'; break; } } test('foo'); test('bar'); test('nope'); test('baz');
Output for 4.3.0 - 7.1.0
foobardefaultbazbaz