3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { protected function _x() { echo "a"; } public function __call($methodName, array $arguments) { throw new Exception("Unknown method."); } } class B extends A { public function x() { parent::_x(); call_user_func('parent::_x'); call_user_func(['parent', '_x']); } } $b = new B; $b->x();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4El6Z
function name:  (null)
number of ops:  6
compiled vars:  !0 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   26     0  E >   NEW                                                  $1      'B'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   27     3        INIT_METHOD_CALL                                             !0, 'x'
          4        DO_FCALL                                          0          
          5      > RETURN                                                       1

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

End of function _x

Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/4El6Z
function name:  __call
number of ops:  7
compiled vars:  !0 = $methodName, !1 = $arguments
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
   12     2        NEW                                                  $2      'Exception'
          3        SEND_VAL_EX                                                  'Unknown+method.'
          4        DO_FCALL                                          0          
          5      > THROW                                             0          $2
   13     6*     > RETURN                                                       null

End of function __call

End of class A.

Class B:
Function x:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4El6Z
function name:  x
number of ops:  7
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   20     0  E >   INIT_STATIC_METHOD_CALL                                      '_x'
          1        DO_FCALL                                          0          
   21     2        INIT_USER_CALL                                    0          'call_user_func', 'parent%3A%3A_x'
          3        DO_FCALL                                          0          
   22     4        INIT_USER_CALL                                    0          'call_user_func', <array>
          5        DO_FCALL                                          0          
   23     6      > RETURN                                                       null

End of function x

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

End of function _x

Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/4El6Z
function name:  __call
number of ops:  7
compiled vars:  !0 = $methodName, !1 = $arguments
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
   12     2        NEW                                                  $2      'Exception'
          3        SEND_VAL_EX                                                  'Unknown+method.'
          4        DO_FCALL                                          0          
          5      > THROW                                             0          $2
   13     6*     > RETURN                                                       null

End of function __call

End of class B.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
238.9 ms | 3259 KiB | 13 Q