3v4l.org

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

Class e: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
150.82 ms | 1468 KiB | 14 Q