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 - 5.6.28, 7.0.0 - 7.1.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 hhvm-3.10.0 - 3.12.0
33
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