PHP Function Reference

PHP password_algos() Function



The PHP password_algos() function returns a complete list of all registered password hashing algorithm IDs as an array of strings.

Syntax

password_algos()

Parameters

No parameter is required.

Return Value

Returns the available password hashing algorithm IDs.

Example: password_algos() example

The example below shows the usage of password_algos() function.

<?php
//getting the available password 
//hashing algorithm IDs
print_r(password_algos());
?>

The output of the above code will be:

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

❮ PHP Password Hashing Reference

5