password_algos()
password_algos() — Get available password hashing algorithm IDs.
Built-in function of PHP 8.5. The manual lists it as available in PHP 7 >= 7.4.0, PHP 8. This page is the reference card: signature, parameters and return value, plus the changelog and the example the manual provides.
What it does
Returns a complete list of all registered password hashing algorithm IDs as an array of strings.
Signature
password_algos(): array
Parameters
This function takes no parameters.
Return value
Returns the available password hashing algorithm IDs.
Example
A runnable snippet:
print_r(password_algos());
Output:
Array ( [0] => 2y [1] => argon2i [2] => argon2id )
All PHP 8.5 built-in functions
Reference card built from the PHP manual page password_algos() (PHP documentation, CC BY 3.0). The page is generated from the manual, so the wording of the parameter and return value text follows php.net.