- var_dump: documentation ( source)
- password_hash: documentation ( source)
- password_needs_rehash: documentation ( source)
- password_verify: documentation ( source)
- password_get_info: documentation ( source)
<?php
$hash = password_hash("servergrove", PASSWORD_BCRYPT); // create hash
echo $hash . "\n";
var_dump(password_get_info($hash)); // get hash info (algorithm and options)
var_dump(password_needs_rehash($hash, PASSWORD_BCRYPT)); // check if hash implements the algorith and options provided
var_dump(password_verify("servergrove", $hash)); // check hash matches the password