3v4l.org

run code in 300+ PHP versions simultaneously
<?php enum DefinedInTheBeginning { case FirstCase; } $e1 = DefinedInTheBeginning::FirstCase; print_r($e1); $e2 = DefinedAfterwards::MyCase; print_r($e2); enum DefinedAfterwards { case MyCase; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/troMY
function name:  (null)
number of ops:  13
compiled vars:  !0 = $e1, !1 = $e2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'definedinthebeginning'
    8     1        FETCH_CLASS_CONSTANT                             ~2      'DefinedInTheBeginning', 'FirstCase'
          2        ASSIGN                                                   !0, ~2
    9     3        INIT_FCALL                                               'print_r'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   12     6        FETCH_CLASS_CONSTANT                             ~5      'DefinedAfterwards', 'MyCase'
          7        ASSIGN                                                   !1, ~5
   13     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
   15    11        DECLARE_CLASS                                            'definedafterwards'
   18    12      > RETURN                                                   1

Class DefinedInTheBeginning: [no user functions]
Class DefinedAfterwards: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.63 ms | 1000 KiB | 14 Q