3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TestClass { public function __construct() { } public function __invoke() { } public function foo() { } public static function bar() { } } //$r = new ReflectionMethod('TestClass::foo'); //$r = new ReflectionMethod('TestClass::__construct'); $r = new ReflectionMethod(new TestClass(), '__construct'); var_dump($r->class, $r->name);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZPfm1
function name:  (null)
number of ops:  14
compiled vars:  !0 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $1      'ReflectionMethod'
          1        NEW                                              $2      'TestClass'
          2        DO_FCALL                                      0          
          3        SEND_VAR_NO_REF_EX                                       $2
          4        SEND_VAL_EX                                              '__construct'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $1
   26     7        INIT_FCALL                                               'var_dump'
          8        FETCH_OBJ_R                                      ~6      !0, 'class'
          9        SEND_VAL                                                 ~6
         10        FETCH_OBJ_R                                      ~7      !0, 'name'
         11        SEND_VAL                                                 ~7
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

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

End of function __construct

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

End of function __invoke

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

End of function foo

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

End of function bar

End of class TestClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.76 ms | 1388 KiB | 15 Q