- var_dump: documentation ( source)
- password_hash: documentation ( source)
- password_needs_rehash: documentation ( source)
- password_get_info: documentation ( source)
<?php
$options = [
'cost' => 7,
'salt' => 'BCryptRequires22Chrcts',
];
$hash['hash'][] = password_hash("rasmuslerdorf", PASSWORD_BCRYPT, $options);
$hash['hash'][] = password_hash("rasmuslerdorf", PASSWORD_DEFAULT);
$hash['info'][] = password_get_info($hash['hash'][0]);
$hash['info'][] = password_get_info($hash['hash'][1]);
$hash['rehash'][] = password_needs_rehash($hash['hash'][0],PASSWORD_BCRYPT,$options);
var_dump($hash);