3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ 'a', 'b', 'c' ]; foreach(z($a) as &$x) { $x .= 'q'; } print_r($a); function z($a) { print_r($a); return $a; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
2 jumps found. (Code = 126) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/qcEvY
function name:  (null)
number of ops:  14
compiled vars:  !0 = $a, !1 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL_BY_NAME                                       'z'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $3      
          4        SEPARATE                                         $3      $3
          5      > FE_RESET_RW                                      $4      $3, ->9
          6    > > FE_FETCH_RW                                              $4, !1, ->9
    5     7    >   ASSIGN_OP                                     8          !1, 'q'
    4     8      > JMP                                                      ->6
          9    >   FE_FREE                                                  $4
    7    10        INIT_FCALL                                               'print_r'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
   13    13      > RETURN                                                   1

Function z:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qcEvY
function name:  z
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   11     1        INIT_FCALL                                               'print_r'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   12     4      > RETURN                                                   !0
   13     5*     > RETURN                                                   null

End of function z

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.93 ms | 1395 KiB | 15 Q