3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* wise bits */ const A = 0b00000001; const B = 0b00000010; $mask = A | B; var_dump($mask & A, $mask & B); $mask &= ~A; var_dump($mask & A, $mask & B);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TEO4L
function name:  (null)
number of ops:  26
compiled vars:  !0 = $mask
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CONST                                            'A', 1
    4     1        DECLARE_CONST                                            'B', 2
    6     2        FETCH_CONSTANT                                   ~1      'A'
          3        FETCH_CONSTANT                                   ~2      'B'
          4        BW_OR                                            ~3      ~1, ~2
          5        ASSIGN                                                   !0, ~3
    8     6        INIT_FCALL                                               'var_dump'
          7        FETCH_CONSTANT                                   ~5      'A'
          8        BW_AND                                           ~6      !0, ~5
          9        SEND_VAL                                                 ~6
    9    10        FETCH_CONSTANT                                   ~7      'B'
         11        BW_AND                                           ~8      !0, ~7
         12        SEND_VAL                                                 ~8
    8    13        DO_ICALL                                                 
   11    14        FETCH_CONSTANT                                   ~10     'A'
         15        BW_NOT                                           ~11     ~10
         16        ASSIGN_OP                                    10          !0, ~11
   13    17        INIT_FCALL                                               'var_dump'
         18        FETCH_CONSTANT                                   ~13     'A'
         19        BW_AND                                           ~14     !0, ~13
         20        SEND_VAL                                                 ~14
   14    21        FETCH_CONSTANT                                   ~15     'B'
         22        BW_AND                                           ~16     !0, ~15
         23        SEND_VAL                                                 ~16
   13    24        DO_ICALL                                                 
   14    25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.85 ms | 999 KiB | 14 Q