3v4l.org

run code in 300+ PHP versions simultaneously
<?php function newObject() { return new stdClass(); } function takeObjectByReference($obj) { $obj->changed = TRUE; } $obj = newObject(); takeObjectByReference($obj); var_dump($obj);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t0NjW
function name:  (null)
number of ops:  10
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'newobject'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   11     3        INIT_FCALL                                               'takeobjectbyreference'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0          
   13     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Function newobject:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t0NjW
function name:  newObject
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $0      'stdClass'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
    5     3*     > RETURN                                                   null

End of function newobject

Function takeobjectbyreference:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t0NjW
function name:  takeObjectByReference
number of ops:  4
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        ASSIGN_OBJ                                               !0, 'changed'
          2        OP_DATA                                                  <true>
    9     3      > RETURN                                                   null

End of function takeobjectbyreference

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.9 ms | 1002 KiB | 16 Q