3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { const BAR = 42; } var_dump(constant('Foo::BAR')); var_dump(define('Foo::LOL', 37)); var_dump(Foo::LOL);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9W5f5
function name:  (null)
number of ops:  18
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'constant'
          2        SEND_VAL                                                 'Foo%3A%3ABAR'
          3        DO_ICALL                                         $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
    6     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'define'
          8        SEND_VAL                                                 'Foo%3A%3ALOL'
          9        SEND_VAL                                                 37
         10        DO_ICALL                                         $2      
         11        SEND_VAR                                                 $2
         12        DO_ICALL                                                 
    7    13        INIT_FCALL                                               'var_dump'
         14        FETCH_CLASS_CONSTANT                             ~4      'Foo', 'LOL'
         15        SEND_VAL                                                 ~4
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.12 ms | 1394 KiB | 19 Q