3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private function __call($name, $args) { echo $name; } private function foo() { echo 'ahoj'; } } class B extends A { public function bar() { echo $this->foo()."\n"; } } $a = new B; $a->bar(); var_dump(new ReflectionMethod($a, 'foo')); //$ref = new ReflectionClass($a); //var_dump($ref->getMethods());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6J7Je
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   19     3        INIT_METHOD_CALL                                         !0, 'bar'
          4        DO_FCALL                                      0          
   20     5        INIT_FCALL                                               'var_dump'
          6        NEW                                              $5      'ReflectionMethod'
          7        SEND_VAR_EX                                              !0
          8        SEND_VAL_EX                                              'foo'
          9        DO_FCALL                                      0          
         10        SEND_VAR                                                 $5
         11        DO_ICALL                                                 
   22    12      > RETURN                                                   1

Class A:
Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6J7Je
function name:  __call
number of ops:  4
compiled vars:  !0 = $name, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        ECHO                                                     !0
    5     3      > RETURN                                                   null

End of function __call

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

End of function foo

End of class A.

Class B:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6J7Je
function name:  bar
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_METHOD_CALL                                         'foo'
          1        DO_FCALL                                      0  $0      
          2        CONCAT                                           ~1      $0, '%0A'
          3        ECHO                                                     ~1
   15     4      > RETURN                                                   null

End of function bar

Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6J7Je
function name:  __call
number of ops:  4
compiled vars:  !0 = $name, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        ECHO                                                     !0
    5     3      > RETURN                                                   null

End of function __call

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

End of function foo

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.81 ms | 1404 KiB | 15 Q