3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); trait T { abstract public static function bar(); } class Foo { use T; public static function bar() { var_dump("bar"); } } var_dump(new ReflectionClass('T')); (new Foo)->bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SBvUC
function name:  (null)
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
    9     3        DECLARE_CLASS                                            'foo'
   20     4        INIT_FCALL                                               'var_dump'
          5        NEW                                              $1      'ReflectionClass'
          6        SEND_VAL_EX                                              'T'
          7        DO_FCALL                                      0          
          8        SEND_VAR                                                 $1
          9        DO_ICALL                                                 
   22    10        NEW                                              $4      'Foo'
         11        DO_FCALL                                      0          
         12        INIT_METHOD_CALL                                         $4, 'bar'
         13        DO_FCALL                                      0          
         14      > RETURN                                                   1

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

End of function bar

End of class T.

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SBvUC
function name:  bar
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 'bar'
          2        DO_ICALL                                                 
   16     3      > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.61 ms | 1387 KiB | 17 Q