fork download
  1. <?php
  2.  
  3. $a = [1, 2, 3];
  4. foreach ($a as $b) {
  5. $a[1] = 100;
  6. $a[2] = 200;
  7. echo $b; // 123
  8. }
  9.  
  10.  
Success #stdin #stdout 0.02s 52480KB
stdin
Standard input is empty
stdout
123