3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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 = $hash[28]; $dec = chr($char) $bin = decbin($dec); var_dump( $hash. $char, $dec, $bin ); } meow('secret'); meow('boegaboe'); meow('42'); meow('Ford Prefect'); meow('Arthur Dent');
Output for 5.4.0 - 5.4.26
Parse error: syntax error, unexpected '$bin' (T_VARIABLE) in /in/Te4Ag on line 16
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE in /in/Te4Ag on line 16
Process exited with code 255.