3v4l.org

run code in 300+ PHP versions simultaneously
<?php const A = 'b::c'; class B { static function C() {echo __METHOD__;} } constant('A')(); // displays B::C, // as class and method are case insensitive 'b::c'(); // works as literal A(); // Error, no such function as A ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fMmaU
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_CONST                                            'A', 'b%3A%3Ac'
   10     1        INIT_FCALL                                               'constant'
          2        SEND_VAL                                                 'A'
          3        DO_ICALL                                         $0      
          4        INIT_DYNAMIC_CALL                                        $0
          5        DO_FCALL                                      0          
   13     6        INIT_STATIC_METHOD_CALL                                  'b', 'c'
          7        DO_FCALL                                      0          
   15     8        INIT_FCALL_BY_NAME                                       'A'
          9        DO_FCALL                                      0          
   17    10      > RETURN                                                   1

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

End of function c

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.15 ms | 1004 KiB | 14 Q