3v4l.org

run code in 300+ PHP versions simultaneously
<?php function modifyObj($obj, &$objb) { $obj->a = 'Hello world'; $obj->b = 'Something new'; $obj = new StdClass(); $objb = new StdClass(); } $obj = new StdClass(); $obj->a = 'Hello'; $objb = new StdClass(); $objb->a = 'Hi'; modifyObj($obj, $objb); var_dump($obj, $objb);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lAdVj
function name:  (null)
number of ops:  19
compiled vars:  !0 = $obj, !1 = $objb
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $2      'StdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   11     3        ASSIGN_OBJ                                               !0, 'a'
          4        OP_DATA                                                  'Hello'
   13     5        NEW                                              $6      'StdClass'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
   14     8        ASSIGN_OBJ                                               !1, 'a'
          9        OP_DATA                                                  'Hi'
   16    10        INIT_FCALL                                               'modifyobj'
         11        SEND_VAR                                                 !0
         12        SEND_REF                                                 !1
         13        DO_FCALL                                      0          
   18    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !0
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Function modifyobj:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lAdVj
function name:  modifyObj
number of ops:  13
compiled vars:  !0 = $obj, !1 = $objb
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        ASSIGN_OBJ                                               !0, 'a'
          3        OP_DATA                                                  'Hello+world'
    5     4        ASSIGN_OBJ                                               !0, 'b'
          5        OP_DATA                                                  'Something+new'
    6     6        NEW                                              $4      'StdClass'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !0, $4
    7     9        NEW                                              $7      'StdClass'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !1, $7
    8    12      > RETURN                                                   null

End of function modifyobj

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.87 ms | 1399 KiB | 16 Q