3v4l.org

run code in 300+ PHP versions simultaneously
<?php function func($a){ $a->prop='new value'; } $a=new stdClass(); $a->prop='value'; 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/dq5sX
function name:  (null)
number of ops:  15
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   NEW                                              $1      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    7     3        ASSIGN_OBJ                                               !0, 'prop'
          4        OP_DATA                                                  'value'
    8     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
    9     8        INIT_FCALL                                               'func'
          9        SEND_VAR                                                 !0
         10        DO_FCALL                                      0          
   10    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

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

End of function func

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.52 ms | 1397 KiB | 16 Q