3v4l.org

run code in 300+ PHP versions simultaneously
<?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.0.20, 7.1.0 - 7.1.20, 7.2.6
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.5.35, 5.6.7 - 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.3.3 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/K3PQK on line 3
Process exited with code 255.

preferences:
90.49 ms | 401 KiB | 120 Q