3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('cc', 'DEFINE'); $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/kvf7f
function name:  (null)
number of ops:  19
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                                                 'cc'
          2        SEND_VAL                                                 'DEFINE'
          3        DO_ICALL                                                 
    5     4        ASSIGN                                                   !0, 'dd'
    6     5        ASSIGN                                                   !1, 'cc'
    8     6        ASSIGN                                                   !2, <array>
   10     7        INIT_FCALL                                               'constant'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $7      
         10        ASSIGN_OP                                     9          !2, $7
   11    11        INIT_FCALL                                               'constant'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $9      
         14        ASSIGN_OP                                     9          !2, $9
   13    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.37 ms | 1398 KiB | 19 Q