3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $start = 0; $end = 10; $comparator = '<'; $comparatorExpression = null; switch ($comparator) { case '<'; $comparatorExpression = "$i < $end"; break; } for ($i = $start; $comparator; $i++) { echo "$i\n"; if ($i > $end) { echo "fail\n"; break; } }
Output for 5.0.4 - 5.6.26, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
Notice: Undefined variable: i in /in/qsA0M on line 9 0 1 2 3 4 5 6 7 8 9 10 11 fail
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: i in /in/qsA0M on line 9 0 1 2 3 4 5 6 7 8 9 10 11 fail