3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array(); $b = array(); $c = array(); for ($x=1,$n=0;$x<20;$x=$x+3) { $a[] = $x; $b[] = $x+1; $c[] = $x+2; //$x = $x+3; } print_r($a); echo "\n\n"; print_r($b); echo "\n\n"; print_r($c); echo "\n\n";
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => 1 [1] => 4 [2] => 7 [3] => 10 [4] => 13 [5] => 16 [6] => 19 ) Array ( [0] => 2 [1] => 5 [2] => 8 [3] => 11 [4] => 14 [5] => 17 [6] => 20 ) Array ( [0] => 3 [1] => 6 [2] => 9 [3] => 12 [4] => 15 [5] => 18 [6] => 21 )