3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $j = 0; $num = array(1, 2, 3, 4, 5); for($i = 4; $i = 0; $i--) { $num[$i] = $num[$j]; $j++; } print_r(array_reverse($num));
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => 5 [1] => 4 [2] => 3 [3] => 2 [4] => 1 )