3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = 101; switch (true) { default: less: echo "$foo < 100!"; break; default: more: echo "$foo > 100!"; break; default: same: echo "$foo == 100!"; break; default: if ($foo < 100) { goto less; } elseif ($foo > 100) { goto more; } else { goto same; } break; }
based on p0YuF
Output for 5.3.0 - 5.6.28
Notice: Undefined variable: foo in /in/j9Ffk on line 18 Notice: Undefined variable: foo in /in/j9Ffk on line 7 < 100!