3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('dd', 'DEFINE'); define('cc', 'DEFINE2'); $a = 'dd'; $b = 'cc'; $flags = array(); $flags |= constant($a); $flags |= constant($b); var_dump($flags);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mvfEd
function name:  (null)
number of ops:  23
compiled vars:  !0 = $a, !1 = $b, !2 = $flags
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'dd'
          2        SEND_VAL                                                 'DEFINE'
          3        DO_ICALL                                                 
    4     4        INIT_FCALL                                               'define'
          5        SEND_VAL                                                 'cc'
          6        SEND_VAL                                                 'DEFINE2'
          7        DO_ICALL                                                 
    6     8        ASSIGN                                                   !0, 'dd'
    7     9        ASSIGN                                                   !1, 'cc'
    9    10        ASSIGN                                                   !2, <array>
   11    11        INIT_FCALL                                               'constant'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $8      
         14        ASSIGN_OP                                     9          !2, $8
   12    15        INIT_FCALL                                               'constant'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $10     
         18        ASSIGN_OP                                     9          !2, $10
   14    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159 ms | 1395 KiB | 19 Q