- var_dump: documentation ( source)
- crypt: documentation ( source)
<?php
$plain = 'hello';
$hash = crypt(
$plain, '$5$rounds=1000$'."T\xA2\x9D]\x1A\xD30B%H\xEB\xBEF<\xC8\x92"
);
echo "has algo: ", var_dump(strlen($hash) > 13),
"hash : ", var_dump($hash),
"true : ", var_dump($hash === crypt($plain, $hash))
;