3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( array(5,1), array(4,1), array(4,1), array(1,0) ); // ______ - // | _____ 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')); echo "\n\n\n"; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 50
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 50
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
2 jumps found. (Code = 46) Position 1 = 42, Position 2 = 46
Branch analysis from position: 42
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 46
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
2 jumps found. (Code = 46) Position 1 = 42, Position 2 = 46
Branch analysis from position: 42
Branch analysis from position: 46
Branch analysis from position: 36
Branch analysis from position: 36
Branch analysis from position: 50
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 50
filename:       /in/ejL9s
function name:  (null)
number of ops:  52
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, ->50
         10    > > FE_FETCH_R                                               $7, !2, ->50
   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
   33    36    >   INIT_FCALL                                               'printf'
         37        SEND_VAL                                                 '%2504b%0A'
         38        SEND_VAR                                                 !1
         39        DO_ICALL                                                 
   34    40        INIT_FCALL                                               'var_dump'
         41      > JMPZ_EX                                          ~24     !1, ->46
         42    >   INIT_FCALL                                               'bindec'
         43        SEND_VAL                                                 '0100'
         44        DO_ICALL                                         $25     
         45        BOOL                                             ~24     $25
         46    >   SEND_VAL                                                 ~24
         47        DO_ICALL                                                 
   35    48        ECHO                                                     '%0A%0A%0A'
   18    49      > JMP                                                      ->10
         50    >   FE_FREE                                                  $7
   37    51      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.06 ms | 1392 KiB | 19 Q