3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php switch ($i): case 0: echo "i equals 0"; break; case 1: echo "i equals 1"; break; case 2: echo "i equals 2"; break; default: echo "i is not equal to 0, 1 or 2"; endswitch;
Output for 5.1.0 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined variable: i in /in/WO3o1 on line 3 i equals 0
Output for hhvm-3.10.0 - 3.13.2
Notice: Undefined variable: i in /in/WO3o1 on line 14 i equals 0
Output for 5.0.4 - 5.0.5
Notice: Undefined variable: i in /in/WO3o1 on line 2 i equals 0
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: i in /in/WO3o1 on line 2 i equals 0