3v4l.org

run code in 300+ PHP versions simultaneously
<?php function someObjectFunction($o) { $o->prop = 'test2'; } $o = new stdClass(); $o->prop = 'test'; someObjectFunction($o); var_dump($o); function someArrayFunction($a) { $a['prop'] = 'test2'; } $a = []; $a['prop'] = 'test'; someArrayFunction($a); var_dump($a);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6XN7p
function name:  (null)
number of ops:  21
compiled vars:  !0 = $o, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $2      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    8     3        ASSIGN_OBJ                                               !0, 'prop'
          4        OP_DATA                                                  'test'
    9     5        INIT_FCALL                                               'someobjectfunction'
          6        SEND_VAR                                                 !0
          7        DO_FCALL                                      0          
   10     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
   16    11        ASSIGN                                                   !1, <array>
   17    12        ASSIGN_DIM                                               !1, 'prop'
         13        OP_DATA                                                  'test'
   18    14        INIT_FCALL                                               'somearrayfunction'
         15        SEND_VAR                                                 !1
         16        DO_FCALL                                      0          
   19    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

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

End of function someobjectfunction

Function somearrayfunction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6XN7p
function name:  someArrayFunction
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        ASSIGN_DIM                                               !0, 'prop'
          2        OP_DATA                                                  'test2'
   14     3      > RETURN                                                   null

End of function somearrayfunction

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.46 ms | 1436 KiB | 16 Q