3v4l.org

run code in 300+ PHP versions simultaneously
<?php function appendZ($array) { $array[0] .= 'z'; $array[1] .= 'z'; $array[2] .= 'z'; $array[3] .= 'z'; } $a = ['a', 'b', 'c', 'd']; $v = &$a[2]; appendZ($a); print_r($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5WPsX
function name:  (null)
number of ops:  10
compiled vars:  !0 = $a, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, <array>
   12     1        FETCH_DIM_W                                      $3      !0, 2
          2        ASSIGN_REF                                               !1, $3
   14     3        INIT_FCALL                                               'appendz'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0          
   16     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function appendz:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5WPsX
function name:  appendZ
number of ops:  10
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN_DIM_OP                .=               8          !0, 0
          2        OP_DATA                                                  'z'
    5     3        ASSIGN_DIM_OP                .=               8          !0, 1
          4        OP_DATA                                                  'z'
    6     5        ASSIGN_DIM_OP                .=               8          !0, 2
          6        OP_DATA                                                  'z'
    7     7        ASSIGN_DIM_OP                .=               8          !0, 3
          8        OP_DATA                                                  'z'
    8     9      > RETURN                                                   null

End of function appendz

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.59 ms | 1003 KiB | 15 Q