3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Lol { const TEST = 'Lol'; } class Foo { const TEST = 'Foo'; } class Bar {} $foo = new Foo(); var_dump($foo::TEST); $bar = new Bar(); var_dump(Bar::TEST);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QtP82
function name:  (null)
number of ops:  16
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   16     3        INIT_FCALL                                               'var_dump'
          4        FETCH_CLASS                                   0  $5      !0
          5        FETCH_CLASS_CONSTANT                             ~6      $5, 'TEST'
          6        SEND_VAL                                                 ~6
          7        DO_ICALL                                                 
   17     8        NEW                                              $8      'Bar'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !1, $8
   18    11        INIT_FCALL                                               'var_dump'
         12        FETCH_CLASS_CONSTANT                             ~11     'Bar', 'TEST'
         13        SEND_VAL                                                 ~11
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Class Lol: [no user functions]
Class Foo: [no user functions]
Class Bar: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.38 ms | 1394 KiB | 15 Q