3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace B { class C { public static function f() { echo '1' . ' - ' . __CLASS__ . "\n"; } } C::f(); } namespace A\B { class C { public static function f() { echo '2' . ' - ' . __CLASS__ . "\n"; } } C::f(); } namespace A { $s = 'C::f'; call_user_func($s); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3hD53
function name:  (null)
number of ops:  9
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        ASSIGN                                                   !0, 'C%3A%3Af'
   19     5        INIT_NS_FCALL_BY_NAME                                    'A%5Ccall_user_func'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0          
   20     8      > 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/3hD53
function name:  f
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     '1+-+B%5CC%0A'
          1      > 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/3hD53
function name:  f
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ECHO                                                     '2+-+A%5CB%5CC%0A'
          1      > RETURN                                                   null

End of function f

End of class A\B\C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.59 ms | 1395 KiB | 15 Q