fork(1) download
  1. <?php
  2.  
  3. $filled = array();
  4. $fillingUp = array(1, 2, 3);
  5.  
  6. for ($i = 0; $i <= 5; $i++) {
  7. $filled[$i] = $fillingUp;
  8. }
  9.  
  10. var_dump($filled);
Success #stdin #stdout 0.02s 52480KB
stdin
Standard input is empty
stdout
array(6) {
  [0]=>
  array(3) {
    [0]=>
    int(1)
    [1]=>
    int(2)
    [2]=>
    int(3)
  }
  [1]=>
  array(3) {
    [0]=>
    int(1)
    [1]=>
    int(2)
    [2]=>
    int(3)
  }
  [2]=>
  array(3) {
    [0]=>
    int(1)
    [1]=>
    int(2)
    [2]=>
    int(3)
  }
  [3]=>
  array(3) {
    [0]=>
    int(1)
    [1]=>
    int(2)
    [2]=>
    int(3)
  }
  [4]=>
  array(3) {
    [0]=>
    int(1)
    [1]=>
    int(2)
    [2]=>
    int(3)
  }
  [5]=>
  array(3) {
    [0]=>
    int(1)
    [1]=>
    int(2)
    [2]=>
    int(3)
  }
}