3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php switch ($i) { case 0: case 1: case 2: echo "i is less than 3 but not negative"; break; case 3: echo "i is 3"; }
Output for 5.1.0 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined variable: i in /in/hVoUT on line 3 i is less than 3 but not negative
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined variable: i in /in/hVoUT on line 10 i is less than 3 but not negative
Output for 5.0.4 - 5.0.5
Notice: Undefined variable: i in /in/hVoUT on line 2 i is less than 3 but not negative
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: i in /in/hVoUT on line 2 i is less than 3 but not negative