3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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
Jump found. Position 1 = -2
filename:       /in/6J7Je
function name:  (null)
number of ops:  16
compiled vars:  !0 = $a
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   NOP                                                      
  12     1        NOP                                                      
         2        NOP                                                      
  18     3        NEW                                              $4      :-4
         4        DO_FCALL                                      0          
         5        ASSIGN                                                   !0, $4
  19     6        INIT_METHOD_CALL                                         !0, 'bar'
         7        DO_FCALL                                      0          
  20     8        INIT_FCALL                                               'var_dump'
         9        NEW                                              $8      :1
        10        SEND_VAR_EX                                              !0
        11        SEND_VAL_EX                                              'foo'
        12        DO_FCALL                                      0          
        13        SEND_VAR                                                 $8
        14        DO_ICALL                                                 
        15      > RETURN                                                   1

Class A:
Function __call:
Finding entry points
Branch analysis from position: 0
Jump found. 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
Jump found. 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
Jump found. 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
Jump found. 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
Jump found. 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 7.2.0