php8.5
Home/ Manual/ password / functions/ password_algos

password_algos

PHP function Edit on GitHub ✎

(PHP 7 >= 7.4.0, PHP 8)

Get available password hashing algorithm IDs

Description

password_algos(): array

Returns a complete list of all registered password hashing algorithm IDs as an Array of Strings.

Parameters Parameters

Return Values

Returns the available password hashing algorithm IDs.

Examples

Basic password_algos() usage

php
<?php
print_r(password_algos());
?>

The above example will output something similar to:

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

Source: reference/password/functions/password-algos.xml · from the official PHP manual (php/doc-en)