- password_hash: documentation ( source)
<?php
$options = [
'salt' => "AAAAAAAAAAAAAAAAAAAAAA",
];
$strings = [
"hello",
"hello\x00",
"hello\x00hello",
"hello\x00hello\x00",
"hello\x00hello\x00hello\x00hello\x00",
"hello\x00php doesn't care about this",
"ohai",
];
foreach ($strings as $str) {
print password_hash($str, PASSWORD_BCRYPT, $options) . "\n";
}