3v4l.org

run code in 500+ PHP versions simultaneously
<?php class y { static function a() { // display the current class echo __METHOD__; } } class x extends y { static function b($method) { // display the current class with method a above call_user_func($method); $method(); } } (new x)->b(array('parent', 'a')); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HkFmd
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   20     0  E >   NEW                                                  $0      'x'
          1        DO_FCALL                                          0          
          2        INIT_METHOD_CALL                                             $0, 'b'
          3        SEND_VAL_EX                                                  <array>
          4        DO_FCALL                                          0          
   21     5      > RETURN                                                       1

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

End of function a

End of class y.

Class x:
Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HkFmd
function name:  b
number of ops:  6
compiled vars:  !0 = $method
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   RECV                                                 !0      
   15     1        INIT_USER_CALL                                    0          'call_user_func', !0
          2        DO_FCALL                                          0          
   16     3        INIT_DYNAMIC_CALL                                            !0
          4        DO_FCALL                                          0          
   17     5      > RETURN                                                       null

End of function b

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

End of function a

End of class x.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
185.62 ms | 2025 KiB | 13 Q