3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start_time = microtime(TRUE); $data = hash('sha256', 'https://laundrapp.com'); $outstring = ''; $l = strlen($data); for ($i = 0; $i < $l; $i += 8) { $chunk = substr($data, $i, 8); $outlen = ceil((strlen($chunk) * 8)/6); //8bit/char in, 6bits/char out, round up $x = bin2hex($chunk); //gmp won't convert from binary, so go via hex $w = gmp_strval(gmp_init(ltrim($x, '0'), 16), 62); //gmp doesn't like leading 0s $pad = str_pad($w, $outlen, '0', STR_PAD_LEFT); $outstring .= $pad; } $end_time = microtime(TRUE); echo $end_time - $start_time; echo '\n LOOOL \n'; echo $outstring;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 53
Branch analysis from position: 53
2 jumps found. (Code = 44) Position 1 = 55, Position 2 = 14
Branch analysis from position: 55
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 55, Position 2 = 14
Branch analysis from position: 55
Branch analysis from position: 14
filename:       /in/0uluU
function name:  (null)
number of ops:  64
compiled vars:  !0 = $start_time, !1 = $data, !2 = $outstring, !3 = $l, !4 = $i, !5 = $chunk, !6 = $outlen, !7 = $x, !8 = $w, !9 = $pad, !10 = $end_time
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $11     
          3        ASSIGN                                                   !0, $11
    5     4        INIT_FCALL                                               'hash'
          5        SEND_VAL                                                 'sha256'
          6        SEND_VAL                                                 'https%3A%2F%2Flaundrapp.com'
          7        DO_ICALL                                         $13     
          8        ASSIGN                                                   !1, $13
    7     9        ASSIGN                                                   !2, ''
    9    10        STRLEN                                           ~16     !1
         11        ASSIGN                                                   !3, ~16
   10    12        ASSIGN                                                   !4, 0
         13      > JMP                                                      ->53
   11    14    >   INIT_FCALL                                               'substr'
         15        SEND_VAR                                                 !1
         16        SEND_VAR                                                 !4
         17        SEND_VAL                                                 8
         18        DO_ICALL                                         $19     
         19        ASSIGN                                                   !5, $19
   12    20        INIT_FCALL                                               'ceil'
         21        STRLEN                                           ~21     !5
         22        MUL                                              ~22     ~21, 8
         23        DIV                                              ~23     ~22, 6
         24        SEND_VAL                                                 ~23
         25        DO_ICALL                                         $24     
         26        ASSIGN                                                   !6, $24
   13    27        INIT_FCALL                                               'bin2hex'
         28        SEND_VAR                                                 !5
         29        DO_ICALL                                         $26     
         30        ASSIGN                                                   !7, $26
   14    31        INIT_FCALL_BY_NAME                                       'gmp_strval'
         32        INIT_FCALL_BY_NAME                                       'gmp_init'
         33        INIT_FCALL                                               'ltrim'
         34        SEND_VAR                                                 !7
         35        SEND_VAL                                                 '0'
         36        DO_ICALL                                         $28     
         37        SEND_VAR_NO_REF_EX                                       $28
         38        SEND_VAL_EX                                              16
         39        DO_FCALL                                      0  $29     
         40        SEND_VAR_NO_REF_EX                                       $29
         41        SEND_VAL_EX                                              62
         42        DO_FCALL                                      0  $30     
         43        ASSIGN                                                   !8, $30
   15    44        INIT_FCALL                                               'str_pad'
         45        SEND_VAR                                                 !8
         46        SEND_VAR                                                 !6
         47        SEND_VAL                                                 '0'
         48        SEND_VAL                                                 0
         49        DO_ICALL                                         $32     
         50        ASSIGN                                                   !9, $32
   16    51        ASSIGN_OP                                     8          !2, !9
   10    52        ASSIGN_OP                                     1          !4, 8
         53    >   IS_SMALLER                                               !4, !3
         54      > JMPNZ                                                    ~36, ->14
   19    55    >   INIT_FCALL                                               'microtime'
         56        SEND_VAL                                                 <true>
         57        DO_ICALL                                         $37     
         58        ASSIGN                                                   !10, $37
   21    59        SUB                                              ~39     !10, !0
         60        ECHO                                                     ~39
   23    61        ECHO                                                     '%5Cn+LOOOL+%5Cn'
   25    62        ECHO                                                     !2
         63      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.98 ms | 1405 KiB | 33 Q