3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function swap($g, $k) { $temp = $g; $g = $k; $k = $temp; } if($g>$k) swap($g, $k); for($i=$g; $i<=$k; $i++) { echo $i."<br>"; } ?>
Output for 7.0.0 - 7.2.0
Notice: Undefined variable: k in /in/ZkNIA on line 10 Notice: Undefined variable: g in /in/ZkNIA on line 10 Notice: Undefined variable: g in /in/ZkNIA on line 11 Notice: Undefined variable: k in /in/ZkNIA on line 11 <br> Notice: Undefined variable: k in /in/ZkNIA on line 11
Output for 5.3.20 - 5.6.28
Notice: Undefined variable: g in /in/ZkNIA on line 10 Notice: Undefined variable: k in /in/ZkNIA on line 10 Notice: Undefined variable: g in /in/ZkNIA on line 11 Notice: Undefined variable: k in /in/ZkNIA on line 11 <br> Notice: Undefined variable: k in /in/ZkNIA on line 11