3v4l.org

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

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.14 ms | 1395 KiB | 19 Q