3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( array(5,1), array(4,0), array(4,1), array(1,1) ); // ______ - // | _____ mind. 1 Position komplett offen // || ____ Position mit Teilmengen geliefert // ||| ___ alles komplett // |||| $bitmask = bindec('0001'); printf("%04b\n", $bitmask); foreach ($arr as $w) { if ($w[0] == $w[1]) { $bitmask |= bindec('0010'); } elseif ($w[0] > $w[1]) { $bitmask &= ~bindec('0001'); if ($w[1] == 0) { $bitmask |= bindec('0100'); } } } printf("%04b\n", $bitmask); var_dump($bitmask && bindec('0100')); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 37
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 37
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 20
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 36
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 36
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 36
Branch analysis from position: 36
Branch analysis from position: 37
2 jumps found. (Code = 46) Position 1 = 44, Position 2 = 48
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 48
Branch analysis from position: 37
filename:       /in/SMjQs
function name:  (null)
number of ops:  51
compiled vars:  !0 = $arr, !1 = $bitmask, !2 = $w
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   15     1        INIT_FCALL                                               'bindec'
          2        SEND_VAL                                                 '0001'
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
   16     5        INIT_FCALL                                               'printf'
          6        SEND_VAL                                                 '%2504b%0A'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
   18     9      > FE_RESET_R                                       $7      !0, ->37
         10    > > FE_FETCH_R                                               $7, !2, ->37
   20    11    >   FETCH_DIM_R                                      ~8      !2, 0
         12        FETCH_DIM_R                                      ~9      !2, 1
         13        IS_EQUAL                                                 ~8, ~9
         14      > JMPZ                                                     ~10, ->20
   22    15    >   INIT_FCALL                                               'bindec'
         16        SEND_VAL                                                 '0010'
         17        DO_ICALL                                         $11     
         18        ASSIGN_OP                                     9          !1, $11
         19      > JMP                                                      ->36
   24    20    >   FETCH_DIM_R                                      ~13     !2, 0
         21        FETCH_DIM_R                                      ~14     !2, 1
         22        IS_SMALLER                                               ~14, ~13
         23      > JMPZ                                                     ~15, ->36
   26    24    >   INIT_FCALL                                               'bindec'
         25        SEND_VAL                                                 '0001'
         26        DO_ICALL                                         $16     
         27        BW_NOT                                           ~17     $16
         28        ASSIGN_OP                                    10          !1, ~17
   28    29        FETCH_DIM_R                                      ~19     !2, 1
         30        IS_EQUAL                                                 ~19, 0
         31      > JMPZ                                                     ~20, ->36
   29    32    >   INIT_FCALL                                               'bindec'
         33        SEND_VAL                                                 '0100'
         34        DO_ICALL                                         $21     
         35        ASSIGN_OP                                     9          !1, $21
   18    36    > > JMP                                                      ->10
         37    >   FE_FREE                                                  $7
   34    38        INIT_FCALL                                               'printf'
         39        SEND_VAL                                                 '%2504b%0A'
         40        SEND_VAR                                                 !1
         41        DO_ICALL                                                 
   35    42        INIT_FCALL                                               'var_dump'
         43      > JMPZ_EX                                          ~24     !1, ->48
         44    >   INIT_FCALL                                               'bindec'
         45        SEND_VAL                                                 '0100'
         46        DO_ICALL                                         $25     
         47        BOOL                                             ~24     $25
         48    >   SEND_VAL                                                 ~24
         49        DO_ICALL                                                 
   37    50      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.07 ms | 1400 KiB | 19 Q