3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); enum A: string { case Foo = 'foo'; case Bar = 'bar'; } var_dump(array_combine( array_column(A::cases(), 'value'), array_column(A::cases(), 'name'), ));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sDIfi
function name:  (null)
number of ops:  21
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   DECLARE_CLASS                                            'a'
   10     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'array_combine'
   11     3        INIT_FCALL                                               'array_column'
          4        INIT_STATIC_METHOD_CALL                                  'A', 'cases'
          5        DO_FCALL                                      0  $0      
          6        SEND_VAR                                                 $0
          7        SEND_VAL                                                 'value'
          8        DO_ICALL                                         $1      
          9        SEND_VAR                                                 $1
   12    10        INIT_FCALL                                               'array_column'
         11        INIT_STATIC_METHOD_CALL                                  'A', 'cases'
         12        DO_FCALL                                      0  $2      
         13        SEND_VAR                                                 $2
         14        SEND_VAL                                                 'name'
         15        DO_ICALL                                         $3      
         16        SEND_VAR                                                 $3
   10    17        DO_ICALL                                         $4      
   12    18        SEND_VAR                                                 $4
   10    19        DO_ICALL                                                 
   13    20      > RETURN                                                   1

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.75 ms | 999 KiB | 16 Q