3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace B { class C { public static function f() { var_dump(__CLASS__); } } C::f(); } namespace A\B { class C { public static function f() { var_dump(__CLASS__); } } C::f(); } namespace A { B\C::f(); \B\C::f(); A\B\C::f(); \A\B\C::f(); $s = 'B\C::f'; call_user_func($s); $s = '\B\C::f'; call_user_func($s); $s = 'A\B\C::f'; call_user_func($s); $s = '\A\B\C::f'; call_user_func($s); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/09Q2t
function name:  (null)
number of ops:  29
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_STATIC_METHOD_CALL                                  'B%5CC', 'f'
          1        DO_FCALL                                      0          
   14     2        INIT_STATIC_METHOD_CALL                                  'A%5CB%5CC', 'f'
          3        DO_FCALL                                      0          
   18     4        INIT_STATIC_METHOD_CALL                                  'A%5CB%5CC', 'f'
          5        DO_FCALL                                      0          
   19     6        INIT_STATIC_METHOD_CALL                                  'B%5CC', 'f'
          7        DO_FCALL                                      0          
   20     8        INIT_STATIC_METHOD_CALL                                  'A%5CA%5CB%5CC', 'f'
          9        DO_FCALL                                      0          
   21    10        INIT_STATIC_METHOD_CALL                                  'A%5CB%5CC', 'f'
         11        DO_FCALL                                      0          
   22    12        ASSIGN                                                   !0, 'B%5CC%3A%3Af'
   23    13        INIT_NS_FCALL_BY_NAME                                    'A%5Ccall_user_func'
         14        SEND_VAR_EX                                              !0
         15        DO_FCALL                                      0          
   24    16        ASSIGN                                                   !0, '%5CB%5CC%3A%3Af'
   25    17        INIT_NS_FCALL_BY_NAME                                    'A%5Ccall_user_func'
         18        SEND_VAR_EX                                              !0
         19        DO_FCALL                                      0          
   26    20        ASSIGN                                                   !0, 'A%5CB%5CC%3A%3Af'
   27    21        INIT_NS_FCALL_BY_NAME                                    'A%5Ccall_user_func'
         22        SEND_VAR_EX                                              !0
         23        DO_FCALL                                      0          
   28    24        ASSIGN                                                   !0, '%5CA%5CB%5CC%3A%3Af'
   29    25        INIT_NS_FCALL_BY_NAME                                    'A%5Ccall_user_func'
         26        SEND_VAR_EX                                              !0
         27        DO_FCALL                                      0          
   30    28      > RETURN                                                   1

Class B\C:
Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/09Q2t
function name:  f
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_NS_FCALL_BY_NAME                                    'B%5Cvar_dump'
          1        SEND_VAL_EX                                              'B%5CC'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   null

End of function f

End of class B\C.

Class A\B\C:
Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/09Q2t
function name:  f
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_NS_FCALL_BY_NAME                                    'A%5CB%5Cvar_dump'
          1        SEND_VAL_EX                                              'A%5CB%5CC'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   null

End of function f

End of class A\B\C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.97 ms | 1400 KiB | 17 Q