- substr: documentation ( source)
- var_dump: documentation ( source)
- crypt: documentation ( source)
<?php
$salt = '$2y$04$AVgigiF9sRGgbChVfkgZgg';
$hash = crypt("test", $salt);
var_dump($salt, $hash);
$salt2 = substr($hash, 0, 29);
var_dump($salt2);
$hash2 = crypt("test", $salt2);
var_dump($hash2);