PHP password_algos() Function Last Updated : 12 Apr, 2023 Comments Improve Suggest changes Like Article Like Report The password_algos() is an inbuilt function in PHP that returns the Ids which get available by the password hashing algorithm. Here, Id represents the array of strings. Syntax: password_algos(): arrayParameter: This function does not accept any parameter. Return Value: This function returns an array containing the names of all supported password hashing algorithms. The array elements are strings representing the names of the hashing algorithms, such as bcrypt, argon2i, argon2id, sha256, and sha512, among others. Example 1: The following code demonstrates the password_algos() function. PHP <?php $algos = password_algos(); echo "Supported password hashing algorithms:\n"; foreach ($algos as $algo) { echo "- $algo\n"; } ?> Output: Supported password hashing algorithms: - 2y - argon2i - argon2id Example 2: The following code demonstrates the password_algos() function. PHP <?php $algo = 'argon2i'; if (in_array($algo, password_algos())) { echo "The $algo algorithm is supported.\n"; } else { echo "The $algo algorithm is not supported.\n"; } ?> Output: The argon2i algorithm is supported. Reference: https://www.php.net/manual/en/function.password-algos.php Comment More infoAdvertise with us Next Article PHP password_algos() Function neeraj3304 Follow Improve Article Tags : PHP PHP-function Similar Reads PHP | hash_algos() Function The hash_algos() function is an inbuilt function in PHP which is used to return a list of registered hashing algorithms. Syntax: array hash_algos( void ) Parameter: This function does not accepts any parameter. Return Value: This function returns a numerically indexed array which contains the list o 2 min read PHP | hash_hmac_algos() Function The hash_hmac_algos() function is an inbuilt function in PHP that is used to get the list of registered hashing algorithms suitable for the hash_hmac() function. Syntax: array hash_hmac_algos( void ) Parameters: This function does not accept any parameter. Return Value: This function returns an ar 2 min read PHP password_get_info() Function The password_get_info() is an inbuilt PHP function where detailed information regarding the given hash will be returned. Syntax: password_get_info(string $hash): arrayParameter: This function accepts a single parameter: hash: This parameter defines the hash of the password by creating the password_h 1 min read PHP acos( ) Function Trigonometry is an important part of mathematics and PHPâs math functions provides us with some functions which are very useful for calculations involving trigonometry. One of such function is acos() function. The acos() function in PHP is used to find the arc cosine of a number in radians. We alrea 2 min read PHP acosh( ) Function In mathematics, the inverse hyperbolic functions are the inverse functions of the hyperbolic functions. For a given value of a hyperbolic function, the corresponding inverse hyperbolic function provides the corresponding hyperbolic angle. PHP provides us with builtin functions for inverse hyperbolic 1 min read PHP cos( ) Function Trigonometry is an important part of mathematics and PHPâs math functions provides us with some functions which are very useful for calculations involving trigonometry. The cos()function in PHP is used to find the cosine of a number. The cos() function returns a float value between -1 and 1, which r 2 min read PHP Arrow Functions PHP arrow functions are a shorthand syntax for anonymous functions. It was introduced in PHP 7.4, which provides a shorter way to write anonymous functions. They allow you to create functions with fewer lines of code while maintaining functionality. They provide an easy-to-read syntax, particularly 5 min read PHP abs() Function The abs() function is an inbuilt function in PHP which is used to return the absolute (positive) value of a number. The abs() function in PHP is identical to what we call modulus in mathematics. The modulus or absolute value of a negative number is positive. Syntaxnumber abs( value )ParametersThe ab 1 min read PHP krsort() Function The krsort() function is an inbuilt function in PHP which is used to sort an array by key in reverse order according to its index values. It sorts in a way that relation between indices and values is maintained. Syntax: bool krsort( $array, $sorting_type ) Parameters: This function accepts two param 2 min read PHP asin( ) Function Trigonometry is an important part of mathematics and PHPâs math functions provides us with some functions which are very useful for calculations involving trigonometry. One of such function is asin() function. The asin() function in PHP is used to find the arc sine of a number in radians. We already 2 min read Like