3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "testing bit operations\n"; $flag = 0; echo "To start, the setting will be off: $flag\n"; echo "Now we will see if any of the bits are set.\n"; echo "1: ". $flag & 1 == 1 ."\n"; echo "2: ". $flag & 2 == 2 ."\n"; echo "4: ". $flag & 4 == 4 ."\n"; echo "test";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RUGIR
function name:  (null)
number of ops:  18
compiled vars:  !0 = $flag
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ECHO                                                     'testing+bit+operations%0A'
    3     1        ASSIGN                                                   !0, 0
    4     2        ROPE_INIT                                     3  ~3      'To+start%2C+the+setting+will+be+off%3A+'
          3        ROPE_ADD                                      1  ~3      ~3, !0
          4        ROPE_END                                      2  ~2      ~3, '%0A'
          5        ECHO                                                     ~2
    5     6        ECHO                                                     'Now+we+will+see+if+any+of+the+bits+are+set.%0A'
    6     7        CONCAT                                           ~5      '1%3A+', !0
          8        BW_AND                                           ~6      ~5, <true>
          9        ECHO                                                     ~6
    7    10        CONCAT                                           ~7      '2%3A+', !0
         11        BW_AND                                           ~8      ~7, <true>
         12        ECHO                                                     ~8
    8    13        CONCAT                                           ~9      '4%3A+', !0
         14        BW_AND                                           ~10     ~9, <true>
         15        ECHO                                                     ~10
    9    16        ECHO                                                     'test'
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.96 ms | 1397 KiB | 13 Q