- password_hash: documentation ( source)
- base64_encode: documentation ( source)
<?php
$options = [
'cost' => 10, // increase this value to increase iteration count and the time it takes to generate hashes.
'salt' => base64_encode('Laugh and spit into the air. There could be holy fallout!') // a secure SALT value will automatically be created
];
echo password_hash("coolespasswort!", PASSWORD_BCRYPT, $options);