3v4l.org

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

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

Class Bar: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.38 ms | 1394 KiB | 15 Q