3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $options = [ 'cost' => 7, 'salt' => 'BCryptRequires22Chrcts', ]; $hash[] = password_get_info(password_hash("rasmuslerdorf", PASSWORD_BCRYPT, $options)); $hash[] = password_get_info(password_hash("rasmuslerdorf", PASSWORD_DEFAULT)); var_dump($hash);
Output for 7.0.0 - 7.1.0
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/K3PQK on line 7 array(2) { [0]=> array(3) { ["algo"]=> int(1) ["algoName"]=> string(6) "bcrypt" ["options"]=> array(1) { ["cost"]=> int(7) } } [1]=> array(3) { ["algo"]=> int(1) ["algoName"]=> string(6) "bcrypt" ["options"]=> array(1) { ["cost"]=> int(10) } } }
Output for 5.5.24 - 5.6.28
array(2) { [0]=> array(3) { ["algo"]=> int(1) ["algoName"]=> string(6) "bcrypt" ["options"]=> array(1) { ["cost"]=> int(7) } } [1]=> array(3) { ["algo"]=> int(1) ["algoName"]=> string(6) "bcrypt" ["options"]=> array(1) { ["cost"]=> int(10) } } }
Output for 5.4.0 - 5.4.45
Fatal error: Call to undefined function password_get_info() in /in/K3PQK on line 7
Process exited with code 255.
Output for 5.2.14 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/K3PQK on line 3
Process exited with code 255.