3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Derp { function test() { return 'herr'; } static function get() { return new Derp; } } echo Derp::get()->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JGMHN
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_STATIC_METHOD_CALL                                  'Derp', 'get'
          1        DO_FCALL                                      0  $0      
          2        INIT_METHOD_CALL                                         $0, 'test'
          3        DO_FCALL                                      0  $1      
          4        ECHO                                                     $1
          5      > RETURN                                                   1

Class Derp:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JGMHN
function name:  test
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   'herr'
    7     1*     > RETURN                                                   null

End of function test

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

End of function get

End of class Derp.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.08 ms | 1385 KiB | 13 Q