3v4l.org

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

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

End of function y

End of class x.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.77 ms | 1394 KiB | 15 Q