3v4l.org

run code in 500+ PHP versions simultaneously
<?php enum Test: int { Case three = 1+2; } enum MemoryUnit: int { case Byte = 1; case Kilobyte = 1_024; case Megabyte = 1_024 * 1_024; case Gigabyte = 1_024 * 1_024 * 1_024; case Terabyte = 1_024 * 1_024 * 1_024 * 1_024; } Echo MemoryUnit::Gigabyte->value;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Y0dc5
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                                'test'
    7     1        DECLARE_CLASS                                                'memoryunit'
   16     2        FETCH_CLASS_CONSTANT                                 ~0      'MemoryUnit', 'Gigabyte'
          3        FETCH_OBJ_R                                          ~1      ~0, 'value'
          4        ECHO                                                         ~1
   17     5      > RETURN                                                       1

Class Test: [no user functions]
Class MemoryUnit: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.97 ms | 1465 KiB | 13 Q