3v4l.org

run code in 500+ PHP versions simultaneously
<?php enum Status { case Draft; case Published; case Archived; } $reflectionClass = new \ReflectionEnum('\Status'); var_dump($reflectionClass->isInstantiable()); var_dump($reflectionClass->isCloneable());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Etoga
function name:  (null)
number of ops:  16
compiled vars:  !0 = $reflectionClass
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                                'status'
   10     1        NEW                                                  $1      'ReflectionEnum'
          2        SEND_VAL_EX                                                  '%5CStatus'
          3        DO_FCALL                                          0          
          4        ASSIGN                                                       !0, $1
   11     5        INIT_FCALL                                                   'var_dump'
          6        INIT_METHOD_CALL                                             !0, 'isInstantiable'
          7        DO_FCALL                                          0  $4      
          8        SEND_VAR                                                     $4
          9        DO_ICALL                                                     
   12    10        INIT_FCALL                                                   'var_dump'
         11        INIT_METHOD_CALL                                             !0, 'isCloneable'
         12        DO_FCALL                                          0  $6      
         13        SEND_VAR                                                     $6
         14        DO_ICALL                                                     
         15      > RETURN                                                       1

Class Status: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
156.86 ms | 1660 KiB | 14 Q