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($password) { echo decbin(chr(crypt($password, '$2y$07$usesomesillystringforsalt$')[28])), PHP_EOL; } meow('secret'); meow('boegaboe'); meow('42'); meow('Ford Prefect'); meow('Arthur Dent');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hUADQ
function name:  (null)
number of ops:  30
compiled vars:  !0 = $pass, !1 = $salt, !2 = $hash
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                                         $5      
          6        ASSIGN                                                   !2, $5
    7     7        INIT_FCALL                                               'var_dump'
    8     8        SEND_VAR                                                 !2
    9     9        INIT_FCALL                                               'str_split'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $7      
         12        SEND_VAR                                                 $7
         13        DO_ICALL                                                 
   16    14        INIT_FCALL                                               'meow'
         15        SEND_VAL                                                 'secret'
         16        DO_FCALL                                      0          
   17    17        INIT_FCALL                                               'meow'
         18        SEND_VAL                                                 'boegaboe'
         19        DO_FCALL                                      0          
   18    20        INIT_FCALL                                               'meow'
         21        SEND_VAL                                                 '42'
         22        DO_FCALL                                      0          
   19    23        INIT_FCALL                                               'meow'
         24        SEND_VAL                                                 'Ford+Prefect'
         25        DO_FCALL                                      0          
   20    26        INIT_FCALL                                               'meow'
         27        SEND_VAL                                                 'Arthur+Dent'
         28        DO_FCALL                                      0          
         29      > RETURN                                                   1

Function meow:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hUADQ
function name:  meow
number of ops:  15
compiled vars:  !0 = $password
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        INIT_FCALL                                               'decbin'
          2        INIT_FCALL                                               'chr'
          3        INIT_FCALL                                               'crypt'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 '%242y%2407%24usesomesillystringforsalt%24'
          6        DO_ICALL                                         $1      
          7        FETCH_DIM_R                                      ~2      $1, 28
          8        SEND_VAL                                                 ~2
          9        DO_ICALL                                         $3      
         10        SEND_VAR                                                 $3
         11        DO_ICALL                                         $4      
         12        ECHO                                                     $4
         13        ECHO                                                     '%0A'
   14    14      > RETURN                                                   null

End of function meow

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.53 ms | 1403 KiB | 28 Q