3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $exemple = array(); for ($j = 1; $j <= 3; $j++) { $tab = array(); for ($i = 1; $i <= 10; $i++) { array_push($tab, $i); } array_push($exemple, $tab); } print_r ($exemple); ?>
based on UYsph
Output for 4.3.0 - 7.2.0
Array ( [0] => Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 [6] => 7 [7] => 8 [8] => 9 [9] => 10 ) [1] => Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 [6] => 7 [7] => 8 [8] => 9 [9] => 10 ) [2] => Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 [6] => 7 [7] => 8 [8] => 9 [9] => 10 ) )