3v4l.org

run code in 500+ PHP versions simultaneously
<?php enum Colour: string { case Red = '#ff0000'; case Blue = '#0000ff'; case Green = '#00FF00'; } var_dump(Colour::Red::Green);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mFmjF
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                                'colour'
    9     1        INIT_FCALL                                                   'var_dump'
          2        FETCH_CLASS_CONSTANT                                 ~0      'Colour', 'Red'
          3        FETCH_CLASS                                       0  $1      ~0
          4        FETCH_CLASS_CONSTANT                                 ~2      $1, 'Green'
          5        SEND_VAL                                                     ~2
          6        DO_ICALL                                                     
          7      > RETURN                                                       1

Class Colour: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.31 ms | 1333 KiB | 14 Q