fork download
  1. <?php
  2.  
  3. $massiv[]= one;
  4.  
  5. foreach ($massiv as $key => $val)
  6. {
  7.  
  8. $massiv[] = two;
  9. echo $val;
  10.  
  11. }
  12.  
  13. var_dump($massiv);
  14.  
  15. ?>
Success #stdin #stdout #stderr 0.04s 52480KB
stdin
Standard input is empty
stdout
onearray(2) {
  [0]=>
  string(3) "one"
  [1]=>
  string(3) "two"
}
stderr
PHP Notice:  Use of undefined constant one - assumed 'one' in /home/zkrGsc/prog.php on line 3
PHP Notice:  Use of undefined constant two - assumed 'two' in /home/zkrGsc/prog.php on line 8