3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ERight extends SplEnum { const USER = 'user'; const STAFF = 'staff'; } var_dump( new ERight( ERight::User ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sHrVv
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CLASS                                            'eright', 'splenum'
    7     1        INIT_FCALL                                               'var_dump'
          2        NEW                                              $0      'ERight'
          3        FETCH_CLASS_CONSTANT                             ~1      'ERight', 'User'
          4        SEND_VAL_EX                                              ~1
          5        DO_FCALL                                      0          
          6        SEND_VAR                                                 $0
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class ERight: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.64 ms | 1394 KiB | 15 Q