3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array('abe','ben','cam'); foreach ($a as $k=>&$n) $n = strtoupper($n); foreach ($a as $k=>$n) // notice NO reference here! echo "$n\n"; print_r($a); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 2, Position 2 = 9
Branch analysis from position: 2
2 jumps found. (Code = 126) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 9
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 17
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
Branch analysis from position: 9
filename:       /in/MjbGm
function name:  (null)
number of ops:  22
compiled vars:  !0 = $a, !1 = $n, !2 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1      > FE_RESET_RW                                      $4      !0, ->9
          2    > > FE_FETCH_RW                                      ~5      $4, !1, ->9
          3    >   ASSIGN                                                   !2, ~5
    5     4        INIT_FCALL                                               'strtoupper'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $7      
          7        ASSIGN                                                   !1, $7
    4     8      > JMP                                                      ->2
          9    >   FE_FREE                                                  $4
    6    10      > FE_RESET_R                                       $9      !0, ->17
         11    > > FE_FETCH_R                                       ~10     $9, !1, ->17
         12    >   ASSIGN                                                   !2, ~10
    7    13        NOP                                                      
         14        FAST_CONCAT                                      ~12     !1, '%0A'
         15        ECHO                                                     ~12
    6    16      > JMP                                                      ->11
         17    >   FE_FREE                                                  $9
    8    18        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                                 
   10    21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.22 ms | 1395 KiB | 17 Q