3v4l.org

run code in 200+ 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.2.0
Notice: Undefined variable: k in /in/sb4cl on line 3 3 Notice: Undefined variable: p in /in/sb4cl on line 7 3
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: k in /in/sb4cl on line 3 3 Notice: Undefined variable: p in /in/sb4cl on line 7 3