3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php for ($i = 0; $i < 3; $i++){ $k += $i; } echo $k; for ($i = 0; $i < 3; ++$i){ $p += $i; } echo $p;
Output for 5.0.4 - 7.1.0
Notice: Undefined variable: k in /in/nqcs6 on line 3 3 Notice: Undefined variable: p in /in/nqcs6 on line 8 3
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: k in /in/nqcs6 on line 3 3 Notice: Undefined variable: p in /in/nqcs6 on line 8 3