3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mask = 11; $blocks = (int)($mask / 16); $b = unpack('n*', pack('n*', ...array_fill(0, $blocks, 0xffff), ...array_pad([((2 ** (16 - ($mask % 16))) - 1) ^ 0xffff], 8 - $blocks, 0))); foreach ($b as $block) { printf("%016b\n", $block); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 33, Position 2 = 39
Branch analysis from position: 33
2 jumps found. (Code = 78) Position 1 = 34, Position 2 = 39
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
filename:       /in/W0bNQ
function name:  (null)
number of ops:  41
compiled vars:  !0 = $mask, !1 = $blocks, !2 = $b, !3 = $block
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 11
    3     1        DIV                                              ~5      !0, 16
          2        CAST                                          4  ~6      ~5
          3        ASSIGN                                                   !1, ~6
    5     4        INIT_FCALL                                               'unpack'
          5        SEND_VAL                                                 'n%2A'
          6        INIT_FCALL                                               'pack'
          7        SEND_VAL                                                 'n%2A'
          8        INIT_FCALL                                               'array_fill'
          9        SEND_VAL                                                 0
         10        SEND_VAR                                                 !1
         11        SEND_VAL                                                 65535
         12        DO_ICALL                                         $8      
         13        SEND_UNPACK                                              $8
         14        INIT_FCALL                                               'array_pad'
         15        MOD                                              ~9      !0, 16
         16        SUB                                              ~10     16, ~9
         17        POW                                              ~11     2, ~10
         18        SUB                                              ~12     ~11, 1
         19        BW_XOR                                           ~13     ~12, 65535
         20        INIT_ARRAY                                       ~14     ~13
         21        SEND_VAL                                                 ~14
         22        SUB                                              ~15     8, !1
         23        SEND_VAL                                                 ~15
         24        SEND_VAL                                                 0
         25        DO_ICALL                                         $16     
         26        SEND_UNPACK                                              $16
         27        CHECK_UNDEF_ARGS                                         
         28        DO_ICALL                                         $17     
         29        SEND_VAR                                                 $17
         30        DO_ICALL                                         $18     
         31        ASSIGN                                                   !2, $18
    7    32      > FE_RESET_R                                       $20     !2, ->39
         33    > > FE_FETCH_R                                               $20, !3, ->39
    8    34    >   INIT_FCALL                                               'printf'
         35        SEND_VAL                                                 '%25016b%0A'
         36        SEND_VAR                                                 !3
         37        DO_ICALL                                                 
    7    38      > JMP                                                      ->33
         39    >   FE_FREE                                                  $20
    9    40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.73 ms | 1400 KiB | 23 Q