3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mask = 1; $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 = 34, Position 2 = 40
Branch analysis from position: 34
2 jumps found. (Code = 78) Position 1 = 35, Position 2 = 40
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 40
filename:       /in/0T40g
function name:  (null)
number of ops:  42
compiled vars:  !0 = $mask, !1 = $blocks, !2 = $b, !3 = $block
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 1
    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_NOT                                           ~13     ~12
         20        BW_AND                                           ~14     ~13, 65535
         21        INIT_ARRAY                                       ~15     ~14
         22        SEND_VAL                                                 ~15
         23        SUB                                              ~16     8, !1
         24        SEND_VAL                                                 ~16
         25        SEND_VAL                                                 0
         26        DO_ICALL                                         $17     
         27        SEND_UNPACK                                              $17
         28        CHECK_UNDEF_ARGS                                         
         29        DO_ICALL                                         $18     
         30        SEND_VAR                                                 $18
         31        DO_ICALL                                         $19     
         32        ASSIGN                                                   !2, $19
    7    33      > FE_RESET_R                                       $21     !2, ->40
         34    > > FE_FETCH_R                                               $21, !3, ->40
    8    35    >   INIT_FCALL                                               'printf'
         36        SEND_VAL                                                 '%25016b%0A'
         37        SEND_VAR                                                 !3
         38        DO_ICALL                                                 
    7    39      > JMP                                                      ->34
         40    >   FE_FREE                                                  $21
    9    41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.07 ms | 1392 KiB | 23 Q