3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ const TABLE = "test"; public static function t() { echo get_called_class(); echo self::TABLE; } } class Child extends Test{ const TABLE = "child"; } Child::t();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DnTFD
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_STATIC_METHOD_CALL                                  'Child', 't'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

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

End of function t

End of class Test.

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

End of function t

End of class Child.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.49 ms | 1393 KiB | 13 Q