3v4l.org

run code in 500+ PHP versions simultaneously
<?php enum Suit: string { case Hearts = 'H'; case Diamonds = 'D'; case Clubs = 'C'; case Spades = 'S'; } $reflection = new ReflectionEnum('Suit'); if ($reflection->isBacked()) { echo $reflection->getBackingType(); } else { // consider as object }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/dLRMX
function name:  (null)
number of ops:  13
compiled vars:  !0 = $reflection
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                                'suit'
   11     1        NEW                                                  $1      'ReflectionEnum'
          2        SEND_VAL_EX                                                  'Suit'
          3        DO_FCALL                                          0          
          4        ASSIGN                                                       !0, $1
   13     5        INIT_METHOD_CALL                                             !0, 'isBacked'
          6        DO_FCALL                                          0  $4      
          7      > JMPZ                                                         $4, ->12
   14     8    >   INIT_METHOD_CALL                                             !0, 'getBackingType'
          9        DO_FCALL                                          0  $5      
         10        ECHO                                                         $5
   13    11      > JMP                                                          ->12
   17    12    > > RETURN                                                       1

Class Suit: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.21 ms | 1301 KiB | 13 Q