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"; }
Output for 5.1.0 - 7.1.0
Notice: Undefined variable: i in /in/3k8ds on line 3 i equals 0
Output for 5.0.4 - 5.0.5
Notice: Undefined variable: i in /in/3k8ds on line 2 i equals 0
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: i in /in/3k8ds on line 2 i equals 0