3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Month extends SplEnum { const January = 1; const February = 2; const March = 3; const April = 4; const May = 5; const June = 6; const July = 7; const August = 8; const September = 9; const October = 10; const November = 11; const December = 12; } $month = new Month(Month::June); var_dump($month); $month = 'aaa'; var_dump($month);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1TZE0
function name:  (null)
number of ops:  14
compiled vars:  !0 = $month
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_CLASS                                            'month', 'splenum'
   21     1        NEW                                              $1      'Month'
          2        FETCH_CLASS_CONSTANT                             ~2      'Month', 'June'
          3        SEND_VAL_EX                                              ~2
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $1
   22     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   23     9        ASSIGN                                                   !0, 'aaa'
   24    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Class Month: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
186.29 ms | 1398 KiB | 15 Q