PHP 7.3 及更早版本的 polyfill
<?php
if (version_compare(PHP_VERSION, '7.4.0', '<')) {
function password_algos(): array
{
$algos = [PASSWORD_BCRYPT];
defined('PASSWORD_ARGON2I') && $algos[] = PASSWORD_ARGON2I;
defined('PASSWORD_ARGON2ID') && $algos[] = PASSWORD_ARGON2ID;
return $algos;
}
}
?>