3v4l.org

run code in 500+ PHP versions simultaneously
<?php enum Fruit { case Apple; case Banana; } class Colors { public const RED = Fruit::Apple; public const YELLOW = Fruit::Banana; } var_dump(gettype(Colors::RED));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f4WIC
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                                'fruit'
   15     1        INIT_FCALL                                                   'var_dump'
          2        FETCH_CLASS_CONSTANT                                 ~0      'Colors', 'RED'
          3        GET_TYPE                                             ~1      ~0
          4        SEND_VAL                                                     ~1
          5        DO_ICALL                                                     
          6      > RETURN                                                       1

Class Fruit: [no user functions]
Class Colors: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.45 ms | 1547 KiB | 14 Q