3v4l.org

run code in 300+ PHP versions simultaneously
<?php $max = 32767; $n = 20; $step = intval($max/$n); for ($i=0; $i<=$n; $i++) { $val = $i*$step; $short = base64_encode(pack('S', $val)); $str = base64_encode(strval($val)); echo "$short $string $val \n";}
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 7
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 7
Branch analysis from position: 32
Branch analysis from position: 7
filename:       /in/5pBHD
function name:  (null)
number of ops:  33
compiled vars:  !0 = $max, !1 = $n, !2 = $step, !3 = $i, !4 = $val, !5 = $short, !6 = $str, !7 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 32767
    4     1        ASSIGN                                                   !1, 20
    5     2        DIV                                              ~10     !0, !1
          3        CAST                                          4  ~11     ~10
          4        ASSIGN                                                   !2, ~11
    7     5        ASSIGN                                                   !3, 0
          6      > JMP                                                      ->30
    8     7    >   MUL                                              ~14     !3, !2
          8        ASSIGN                                                   !4, ~14
    9     9        INIT_FCALL                                               'base64_encode'
         10        INIT_FCALL                                               'pack'
         11        SEND_VAL                                                 'S'
         12        SEND_VAR                                                 !4
         13        DO_ICALL                                         $16     
         14        SEND_VAR                                                 $16
         15        DO_ICALL                                         $17     
         16        ASSIGN                                                   !5, $17
   10    17        INIT_FCALL                                               'base64_encode'
         18        CAST                                          6  ~19     !4
         19        SEND_VAL                                                 ~19
         20        DO_ICALL                                         $20     
         21        ASSIGN                                                   !6, $20
   11    22        ROPE_INIT                                     6  ~23     !5
         23        ROPE_ADD                                      1  ~23     ~23, '+'
         24        ROPE_ADD                                      2  ~23     ~23, !7
         25        ROPE_ADD                                      3  ~23     ~23, '+'
         26        ROPE_ADD                                      4  ~23     ~23, !4
         27        ROPE_END                                      5  ~22     ~23, '+%0A'
         28        ECHO                                                     ~22
    7    29        PRE_INC                                                  !3
         30    >   IS_SMALLER_OR_EQUAL                                      !3, !1
         31      > JMPNZ                                                    ~27, ->7
   11    32    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.59 ms | 1396 KiB | 17 Q