3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $options = [ 'cost' => 12, 'salt' => md5('tes'), ]; $hash = password_hash('tes', PASSWORD_BCRYPT, $options); if (password_verify('tes', $hash)) { echo 'Password is valid!'; } else { echo 'Invalid password.'; }
based on tv19b
Output for 7.0.0 - 7.2.0
Deprecated: password_hash(): Use of the 'salt' option to password_hash is deprecated in /in/W6ZJZ on line 8 Password is valid!
Output for 5.5.0 - 5.6.28
Password is valid!