3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private function bar() { echo 'baz'; } } class Bar extends Foo { public function foo() { $reflected = new ReflectionMethod('Foo', 'bar'); $reflected->invoke($this); } } $bar = new Bar(); $bar->foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uZ8fJ
function name:  (null)
number of ops:  6
compiled vars:  !0 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'Bar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        INIT_METHOD_CALL                                         !0, 'foo'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function bar

End of class Foo.

Class Bar:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uZ8fJ
function name:  foo
number of ops:  10
compiled vars:  !0 = $reflected
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $1      'ReflectionMethod'
          1        SEND_VAL_EX                                              'Foo'
          2        SEND_VAL_EX                                              'bar'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   10     5        INIT_METHOD_CALL                                         !0, 'invoke'
          6        FETCH_THIS                                       $4      
          7        SEND_VAR_EX                                              $4
          8        DO_FCALL                                      0          
   11     9      > 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/uZ8fJ
function name:  bar
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ECHO                                                     'baz'
          1      > RETURN                                                   null

End of function bar

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.19 ms | 1395 KiB | 13 Q