3v4l.org

run code in 500+ PHP versions simultaneously
<?php enum Foo: string { case Bar = 'bar'; case Baz = 'baz'; } $bar = Foo::Bar; var_dump($bar->value);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kIdJu
function name:  (null)
number of ops:  8
compiled vars:  !0 = $bar
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                                'foo'
    8     1        FETCH_CLASS_CONSTANT                                 ~1      'Foo', 'Bar'
          2        ASSIGN                                                       !0, ~1
    9     3        INIT_FCALL                                                   'var_dump'
          4        FETCH_OBJ_R                                          ~3      !0, 'value'
          5        SEND_VAL                                                     ~3
          6        DO_ICALL                                                     
          7      > RETURN                                                       1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
129.2 ms | 476 KiB | 8 Q