3v4l.org

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

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

End of class x.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.13 ms | 1394 KiB | 15 Q