3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array(); $b = array(); $c = array(); for ($x=1,$n=0;$x<100;$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 - 7.1.0
Array ( [0] => 1 [1] => 4 [2] => 7 [3] => 10 [4] => 13 [5] => 16 [6] => 19 [7] => 22 [8] => 25 [9] => 28 [10] => 31 [11] => 34 [12] => 37 [13] => 40 [14] => 43 [15] => 46 [16] => 49 [17] => 52 [18] => 55 [19] => 58 [20] => 61 [21] => 64 [22] => 67 [23] => 70 [24] => 73 [25] => 76 [26] => 79 [27] => 82 [28] => 85 [29] => 88 [30] => 91 [31] => 94 [32] => 97 ) Array ( [0] => 2 [1] => 5 [2] => 8 [3] => 11 [4] => 14 [5] => 17 [6] => 20 [7] => 23 [8] => 26 [9] => 29 [10] => 32 [11] => 35 [12] => 38 [13] => 41 [14] => 44 [15] => 47 [16] => 50 [17] => 53 [18] => 56 [19] => 59 [20] => 62 [21] => 65 [22] => 68 [23] => 71 [24] => 74 [25] => 77 [26] => 80 [27] => 83 [28] => 86 [29] => 89 [30] => 92 [31] => 95 [32] => 98 ) Array ( [0] => 3 [1] => 6 [2] => 9 [3] => 12 [4] => 15 [5] => 18 [6] => 21 [7] => 24 [8] => 27 [9] => 30 [10] => 33 [11] => 36 [12] => 39 [13] => 42 [14] => 45 [15] => 48 [16] => 51 [17] => 54 [18] => 57 [19] => 60 [20] => 63 [21] => 66 [22] => 69 [23] => 72 [24] => 75 [25] => 78 [26] => 81 [27] => 84 [28] => 87 [29] => 90 [30] => 93 [31] => 96 [32] => 99 )