3v4l.org

run code in 300+ PHP versions simultaneously
<?php function func($a){ $a[0]->prop='new value'; } $b->prop='value'; $a=array($b, 2, 3, 4); print_r($a); func($a); print_r($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dDU1l
function name:  (null)
number of ops:  17
compiled vars:  !0 = $b, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN_OBJ                                               !0, 'prop'
          1        OP_DATA                                                  'value'
    8     2        INIT_ARRAY                                       ~3      !0
          3        ADD_ARRAY_ELEMENT                                ~3      2
          4        ADD_ARRAY_ELEMENT                                ~3      3
          5        ADD_ARRAY_ELEMENT                                ~3      4
          6        ASSIGN                                                   !1, ~3
    9     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
   10    10        INIT_FCALL                                               'func'
         11        SEND_VAR                                                 !1
         12        DO_FCALL                                      0          
   11    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Function func:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dDU1l
function name:  func
number of ops:  5
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        FETCH_DIM_W                                      $1      !0, 0
          2        ASSIGN_OBJ                                               $1, 'prop'
          3        OP_DATA                                                  'new+value'
    5     4      > RETURN                                                   null

End of function func

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.37 ms | 1389 KiB | 16 Q