3v4l.org

run code in 300+ PHP versions simultaneously
<?php enum DayOfWeek : int { case MONDAY = 0; case TUESDAY = 1; case WEDNESDAY = 2; case THURSDAY = 3; case FRIDAY = 4; case SATURDAY = 5; case SUNDAY = 6; } define('TUESDAY_VALUE', DayOfWeek::TUESDAY->value); class Foo { public const TUESDAY = TUESDAY_VALUE; } var_dump(Foo::TUESDAY);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iWR6d
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'dayofweek'
   13     1        INIT_FCALL                                               'define'
          2        SEND_VAL                                                 'TUESDAY_VALUE'
          3        FETCH_CLASS_CONSTANT                             ~0      'DayOfWeek', 'TUESDAY'
          4        FETCH_OBJ_R                                      ~1      ~0, 'value'
          5        SEND_VAL                                                 ~1
          6        DO_ICALL                                                 
   22     7        INIT_FCALL                                               'var_dump'
          8        FETCH_CLASS_CONSTANT                             ~3      'Foo', 'TUESDAY'
          9        SEND_VAL                                                 ~3
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Class DayOfWeek: [no user functions]
Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.91 ms | 997 KiB | 15 Q