3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class ParentClass { public static function demo() { echo 'static::TABLE is ', static::TABLE, "\n"; echo 'static::$table is ', static::$table, "\n"; } } class ChildClass extends ParentClass { public const TABLE = 'child_const'; public static string $table = 'child_var'; } ChildClass::demo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6TkfF
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_STATIC_METHOD_CALL                                  'ChildClass', 'demo'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Class ParentClass:
Function demo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6TkfF
function name:  demo
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'static%3A%3ATABLE+is+'
          1        FETCH_CLASS_CONSTANT                             ~0      'TABLE'
          2        ECHO                                                     ~0
          3        ECHO                                                     '%0A'
    6     4        ECHO                                                     'static%3A%3A%24table+is+'
          5        FETCH_STATIC_PROP_R          unknown             ~1      'table'
          6        ECHO                                                     ~1
          7        ECHO                                                     '%0A'
    7     8      > RETURN                                                   null

End of function demo

End of class ParentClass.

Class ChildClass:
Function demo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6TkfF
function name:  demo
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'static%3A%3ATABLE+is+'
          1        FETCH_CLASS_CONSTANT                             ~0      'TABLE'
          2        ECHO                                                     ~0
          3        ECHO                                                     '%0A'
    6     4        ECHO                                                     'static%3A%3A%24table+is+'
          5        FETCH_STATIC_PROP_R          unknown             ~1      'table'
          6        ECHO                                                     ~1
          7        ECHO                                                     '%0A'
    7     8      > RETURN                                                   null

End of function demo

End of class ChildClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.02 ms | 995 KiB | 13 Q