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) { $hash = crypt($password, '$2y$07$usesomesillystringforsalt$'); $char = substr($hash, 28, 1); $dec = chr($char); $bin = decbin($dec); var_dump( $hash, $char, $dec, $bin ); } 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/W9BD1
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                                                 
   26    14        INIT_FCALL                                               'meow'
         15        SEND_VAL                                                 'secret'
         16        DO_FCALL                                      0          
   27    17        INIT_FCALL                                               'meow'
         18        SEND_VAL                                                 'boegaboe'
         19        DO_FCALL                                      0          
   28    20        INIT_FCALL                                               'meow'
         21        SEND_VAL                                                 '42'
         22        DO_FCALL                                      0          
   29    23        INIT_FCALL                                               'meow'
         24        SEND_VAL                                                 'Ford+Prefect'
         25        DO_FCALL                                      0          
   30    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/W9BD1
function name:  meow
number of ops:  27
compiled vars:  !0 = $password, !1 = $hash, !2 = $char, !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                                                 !0
          3        SEND_VAL                                                 '%242y%2407%24usesomesillystringforsalt%24'
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
   14     6        INIT_FCALL                                               'substr'
          7        SEND_VAR                                                 !1
          8        SEND_VAL                                                 28
          9        SEND_VAL                                                 1
         10        DO_ICALL                                         $7      
         11        ASSIGN                                                   !2, $7
   15    12        INIT_FCALL                                               'chr'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                         $9      
         15        ASSIGN                                                   !3, $9
   16    16        INIT_FCALL                                               'decbin'
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                         $11     
         19        ASSIGN                                                   !4, $11
   18    20        INIT_FCALL                                               'var_dump'
   19    21        SEND_VAR                                                 !1
   20    22        SEND_VAR                                                 !2
   21    23        SEND_VAR                                                 !3
   22    24        SEND_VAR                                                 !4
         25        DO_ICALL                                                 
   24    26      > RETURN                                                   null

End of function meow

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.26 ms | 1394 KiB | 30 Q