Function __global->password_hash
Definitions
sources_custom/phpstub.php
- Hash the password using the specified algorithm.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $password | string | No | No | required parameter | N/A | N/A | The password to hash |
| $algo | integer | No | No | required parameter | N/A | N/A | The algorithm to use (Defined by PASSWORD_* constants) |
| $options | array | No | No | required parameter | N/A | N/A | The options for the algorithm to use |
Returns
- The hashed password (false: error)
- Type: ~string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Hash the password using the specified algorithm.
*
* @param string $password The password to hash
* @param integer $algo The algorithm to use (Defined by PASSWORD_* constants)
* @param array $options The options for the algorithm to use
* @return ~string The hashed password (false: error)
*/
function password_hash(string $password, int $algo, array $options)
* Hash the password using the specified algorithm.
*
* @param string $password The password to hash
* @param integer $algo The algorithm to use (Defined by PASSWORD_* constants)
* @param array $options The options for the algorithm to use
* @return ~string The hashed password (false: error)
*/
function password_hash(string $password, int $algo, array $options)

