3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { public static function who() { var_dump(get_called_class()); } } class B extends A { public static function who() { parent::who(); } } B::who(); call_user_func(array('A', 'who')); call_user_func(array('B', 'parent::who')); $method = array('B', 'parent::who'); $method(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vbuVd
function name:  (null)
number of ops:  10
compiled vars:  !0 = $method
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   17     0  E >   INIT_STATIC_METHOD_CALL                                      'B', 'who'
          1        DO_FCALL                                          0          
   18     2        INIT_USER_CALL                                    0          'call_user_func', <array>
          3        DO_FCALL                                          0          
   19     4        INIT_USER_CALL                                    0          'call_user_func', <array>
          5        DO_FCALL                                          0          
   21     6        ASSIGN                                                       !0, <array>
   22     7        INIT_DYNAMIC_CALL                                            !0
          8        DO_FCALL                                          0          
   24     9      > RETURN                                                       1

Class A:
Function who:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vbuVd
function name:  who
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                                   'var_dump'
          1        GET_CALLED_CLASS                                     ~0      
          2        SEND_VAL                                                     ~0
          3        DO_ICALL                                                     
    8     4      > RETURN                                                       null

End of function who

End of class A.

Class B:
Function who:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vbuVd
function name:  who
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   INIT_STATIC_METHOD_CALL                                      'who'
          1        DO_FCALL                                          0          
   15     2      > RETURN                                                       null

End of function who

End of class B.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.04 ms | 3361 KiB | 14 Q