3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.38 ms | 1400 KiB | 23 Q