Php/docs/function.password-algos

来自菜鸟教程
机器人讨论 | 贡献2020年12月10日 (四) 13:00的版本 (autoload)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至:导航、​搜索

password_algos

(PHP 7 >= 7.4.0)

password_algosGet available password hashing algorithm IDs


说明

password_algos ( ) : array

Returns a complete list of all registered password hashing algorithm IDs as an array of strings.


参数

此函数没有参数。


返回值

Returns the available password hashing algorithm IDs.


范例

Example #1 Basic password() usage

<?phpprint_r(password_algos());?>

以上例程的输出类似于:


Array
(
    [0] => 2y
    [1] => argon2i
    [2] => argon2id
)