3v4l.org

run code in 200+ 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 - 7.2.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