3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public static function c() { echo get_called_class(); } } class B extends A { public static function c() { return call_user_func(function() { return call_user_func_array("call_user_func_array", func_get_args()); }, array('parent', __FUNCTION__), func_get_args()); } } B::c();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MBZcs
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_STATIC_METHOD_CALL                                  'B', 'c'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FMBZcs%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MBZcs
function name:  {closure}
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'call_user_func_array'
          1        FUNC_GET_ARGS                                    ~0      
          2        SEND_ARRAY                                               ~0
          3        CHECK_UNDEF_ARGS                                         
          4        DO_FCALL                                      0  $1      
          5      > RETURN                                                   $1
   13     6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FMBZcs%3A11%240

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

End of function c

End of class A.

Class B:
Function c:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MBZcs
function name:  c
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FMBZcs%3A11%240'
   13     1        INIT_USER_CALL                                2          'call_user_func', ~0
          2        SEND_USER                                                <array>
          3        FUNC_GET_ARGS                                    ~1      
          4        SEND_USER                                                ~1
          5        DO_FCALL                                      0  $2      
          6      > RETURN                                                   $2
   14     7*     > RETURN                                                   null

End of function c

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.35 ms | 1396 KiB | 15 Q