3v4l.org

run code in 500+ PHP versions simultaneously
<?php enum Foo: int { case One = 1; } var_dump( Foo::One instanceof UnitEnum, Foo::One instanceof BackedEnum, Foo::One instanceof IntBackedEnum, );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gbt8M
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CLASS                                                'foo'
    7     1        INIT_FCALL                                                   'var_dump'
    8     2        FETCH_CLASS_CONSTANT                                 ~0      'Foo', 'One'
          3        INSTANCEOF                                           ~1      ~0, 'UnitEnum'
          4        SEND_VAL                                                     ~1
    9     5        FETCH_CLASS_CONSTANT                                 ~2      'Foo', 'One'
          6        INSTANCEOF                                           ~3      ~2, 'BackedEnum'
          7        SEND_VAL                                                     ~3
   10     8        FETCH_CLASS_CONSTANT                                 ~4      'Foo', 'One'
          9        INSTANCEOF                                           ~5      ~4, 'IntBackedEnum'
         10        SEND_VAL                                                     ~5
    7    11        DO_ICALL                                                     
   11    12      > RETURN                                                       1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.92 ms | 1310 KiB | 14 Q