3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $options = ['cost' => 12, 'salt' => sha1('USERID + random')]; $base_de_donnee = password_hash("CPLN", PASSWORD_DEFAULT, $options); $application_ios = password_hash("CPLN", PASSWORD_DEFAULT, $options); echo $base_de_donnee, PHP_EOL; echo $application_ios, PHP_EOL; echo hash_equals($base_de_donnee, $application_ios) ? "okay" : "derp"; ?>
based on NEocW
Output for 7.0.0 - 7.2.0
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/fZVef on line 3 Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/fZVef on line 4 $2y$12$f129c4398addaa28bcfaauPxeR1CxT/3dRg78x1zjy7i1.8FfpO5q $2y$12$f129c4398addaa28bcfaauPxeR1CxT/3dRg78x1zjy7i1.8FfpO5q okay
Output for 5.6.8 - 5.6.28
$2y$12$f129c4398addaa28bcfaauPxeR1CxT/3dRg78x1zjy7i1.8FfpO5q $2y$12$f129c4398addaa28bcfaauPxeR1CxT/3dRg78x1zjy7i1.8FfpO5q okay
Output for 5.5.24 - 5.5.35
$2y$12$f129c4398addaa28bcfaauPxeR1CxT/3dRg78x1zjy7i1.8FfpO5q $2y$12$f129c4398addaa28bcfaauPxeR1CxT/3dRg78x1zjy7i1.8FfpO5q Fatal error: Call to undefined function hash_equals() in /in/fZVef on line 8
Process exited with code 255.
Output for 5.4.10 - 5.4.45
Fatal error: Call to undefined function password_hash() in /in/fZVef on line 3
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/fZVef on line 2
Process exited with code 255.