3v4l.org

run code in 500+ PHP versions simultaneously
<?php function wp_fast_hash( #[\SensitiveParameter] string $message, int $length = 24 ): string { $hashed = sodium_crypto_generichash( $message, '', $length ); return '$generic$' . sodium_bin2base64( $hashed, SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING ); } for ($i = 24; $i < 64; ++$i) { $hash = time() . ':' . wp_fast_hash('foo', $i); if (strlen($hash) > 64) { continue; } echo $i . " length -> " . strlen($hash) . ": " . $hash . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 2
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 2
Branch analysis from position: 25
Branch analysis from position: 2
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 2
Branch analysis from position: 25
Branch analysis from position: 2
filename:       /in/gP6lT
function name:  (null)
number of ops:  26
compiled vars:  !0 = $i, !1 = $hash
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                       !0, 24
          1      > JMP                                                          ->23
   13     2    >   INIT_FCALL                                                   'time'
          3        DO_ICALL                                             $3      
          4        CONCAT                                               ~4      $3, '%3A'
          5        INIT_FCALL                                                   'wp_fast_hash'
          6        SEND_VAL                                                     'foo'
          7        SEND_VAR                                                     !0
          8        DO_FCALL                                          0  $5      
          9        CONCAT                                               ~6      ~4, $5
         10        ASSIGN                                                       !1, ~6
   14    11        STRLEN                                               ~8      !1
         12        IS_SMALLER                                                   64, ~8
         13      > JMPZ                                                         ~9, ->15
   15    14    > > JMP                                                          ->22
   17    15    >   CONCAT                                               ~10     !0, '+length+-%3E+'
         16        STRLEN                                               ~11     !1
         17        CONCAT                                               ~12     ~10, ~11
         18        CONCAT                                               ~13     ~12, '%3A+'
         19        CONCAT                                               ~14     ~13, !1
         20        CONCAT                                               ~15     ~14, '%0A'
         21        ECHO                                                         ~15
   12    22    >   PRE_INC                                                      !0
         23    >   IS_SMALLER                                                   !0, 64
         24      > JMPNZ                                                        ~17, ->2
   18    25    > > RETURN                                                       1

Function wp_fast_hash:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gP6lT
function name:  wp_fast_hash
number of ops:  18
compiled vars:  !0 = $message, !1 = $length, !2 = $hashed
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
    6     1        RECV_INIT                                            !1      24
    8     2        INIT_FCALL_BY_NAME                                           'sodium_crypto_generichash'
          3        SEND_VAR_EX                                                  !0
          4        SEND_VAL_EX                                                  ''
          5        SEND_VAR_EX                                                  !1
          6        DO_FCALL                                          0  $3      
          7        ASSIGN                                                       !2, $3
    9     8        INIT_FCALL_BY_NAME                                           'sodium_bin2base64'
          9        SEND_VAR_EX                                                  !2
         10        FETCH_CONSTANT                                       ~5      'SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING'
         11        SEND_VAL_EX                                                  ~5
         12        DO_FCALL                                          0  $6      
         13        CONCAT                                               ~7      '%24generic%24', $6
         14        VERIFY_RETURN_TYPE                                           ~7
         15      > RETURN                                                       ~7
   10    16*       VERIFY_RETURN_TYPE                                           
         17*     > RETURN                                                       null

End of function wp_fast_hash

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
170.2 ms | 1335 KiB | 15 Q