3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pass = 'secret'; $salt = '$2y$07$usesomesillystringforsalt$'; $hash = crypt($pass, $salt); var_dump( $hash, str_split($hash) // the 22th salt character 'e' is on index 28 ); function meow($char) { $hash = crypt($password, '$2y$07$usesomesillystringfor' . $char); $char = substr($hash, 28, 1); $dec = ord($char); $bin = decbin($dec); var_dump( $hash, $char, $dec, $bin ); } for ($char = 'a'; $char <= 'z'; $char++) { meow($char); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 16
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 16
Branch analysis from position: 22
Branch analysis from position: 16
filename:       /in/m9Qce
function name:  (null)
number of ops:  23
compiled vars:  !0 = $pass, !1 = $salt, !2 = $hash, !3 = $char
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'secret'
    4     1        ASSIGN                                                   !1, '%242y%2407%24usesomesillystringforsalt%24'
    5     2        INIT_FCALL                                               'crypt'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !2, $6
    7     7        INIT_FCALL                                               'var_dump'
    8     8        SEND_VAR                                                 !2
    9     9        INIT_FCALL                                               'str_split'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $8      
         12        SEND_VAR                                                 $8
         13        DO_ICALL                                                 
   26    14        ASSIGN                                                   !3, 'a'
         15      > JMP                                                      ->20
   27    16    >   INIT_FCALL                                               'meow'
         17        SEND_VAR                                                 !3
         18        DO_FCALL                                      0          
   26    19        PRE_INC                                                  !3
         20    >   IS_SMALLER_OR_EQUAL                                      !3, 'z'
         21      > JMPNZ                                                    ~13, ->16
   28    22    > > RETURN                                                   1

Function meow:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/m9Qce
function name:  meow
number of ops:  28
compiled vars:  !0 = $char, !1 = $hash, !2 = $password, !3 = $dec, !4 = $bin
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        INIT_FCALL                                               'crypt'
          2        SEND_VAR                                                 !2
          3        CONCAT                                           ~5      '%242y%2407%24usesomesillystringfor', !0
          4        SEND_VAL                                                 ~5
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !1, $6
   14     7        INIT_FCALL                                               'substr'
          8        SEND_VAR                                                 !1
          9        SEND_VAL                                                 28
         10        SEND_VAL                                                 1
         11        DO_ICALL                                         $8      
         12        ASSIGN                                                   !0, $8
   15    13        INIT_FCALL                                               'ord'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $10     
         16        ASSIGN                                                   !3, $10
   16    17        INIT_FCALL                                               'decbin'
         18        SEND_VAR                                                 !3
         19        DO_ICALL                                         $12     
         20        ASSIGN                                                   !4, $12
   18    21        INIT_FCALL                                               'var_dump'
   19    22        SEND_VAR                                                 !1
   20    23        SEND_VAR                                                 !0
   21    24        SEND_VAR                                                 !3
   22    25        SEND_VAR                                                 !4
         26        DO_ICALL                                                 
   24    27      > RETURN                                                   null

End of function meow

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.04 ms | 1403 KiB | 26 Q