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; } $case = 'SUNDAY'; var_dump(constant("DayOfWeek::$case"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8S493
function name:  (null)
number of ops:  11
compiled vars:  !0 = $case
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'dayofweek'
   14     1        ASSIGN                                                   !0, 'SUNDAY'
   16     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'constant'
          4        NOP                                                      
          5        FAST_CONCAT                                      ~2      'DayOfWeek%3A%3A', !0
          6        SEND_VAL                                                 ~2
          7        DO_ICALL                                         $3      
          8        SEND_VAR                                                 $3
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class DayOfWeek: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.64 ms | 997 KiB | 15 Q