3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { const BAR = [ 3 => ‘qux’, 4 => ‘bang’, 7 => ‘theta’, 9 => ‘epsilon’ ]; const BAZ = FOO[4]; } var_dump(Foo::BAZ); var_dump(Foo::FOO[4]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FWisH
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_CLASS_CONSTANT                             ~0      'Foo', 'BAZ'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   15     4        INIT_FCALL                                               'var_dump'
          5        FETCH_CLASS_CONSTANT                             ~2      'Foo', 'FOO'
          6        FETCH_DIM_R                                      ~3      ~2, 4
          7        SEND_VAL                                                 ~3
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.49 ms | 1394 KiB | 15 Q