3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $start = 0; $end = 10; $comparator = '<'; $comparatorExpression = null; $i = $start; for ( ; ; ) { switch ($comparator) { case '<'; $comparatorExpression = "$i < $end"; break; } } if (eval($i $comparatorExpression $end)) { break; } $i++; if ($i > $end) { echo "fail\n"; break; } }
Output for 5.4.0 - 5.4.30
Parse error: syntax error, unexpected '$comparatorExpression' (T_VARIABLE) in /in/Eo0Uj on line 16
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE in /in/Eo0Uj on line 16
Process exited with code 255.