3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function trySwitch($value) { switch ($value) { case 5; echo "five\n"; case 4; echo "four\n"; default: echo "default\n"; } } for($i=0;$i<10;$i++) trySwitch($i);
based on mBAch
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
default default default default four default five four default default default default default