3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f() { return new stdClass; } function g() { $obj =& f(); var_dump($obj); } g();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8jaim
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'g'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8jaim
function name:  f
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 f

Function g:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8jaim
function name:  g
number of ops:  7
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'f'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN_REF                                               !0, $1
    9     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   10     6      > RETURN                                                   null

End of function g

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.92 ms | 1397 KiB | 17 Q