PHP 7.0.6 Released

password_get_info

(PHP 5 >= 5.5.0, PHP 7)

password_get_infoReturns information about the given hash

Description

array password_get_info ( string $hash )

When passed in a valid hash created by an algorithm supported by password_hash(), this function will return an array of information about that hash.

Parameters

hash

A hash created by password_hash().

Return Values

Returns an associative array with three elements:

User Contributed Notes

hej at gustav dot tv
2 years ago
<?php
var_dump
(password_get_info($hash));
// Example
array(3) {
  [
"algo"]=>
 
int(1)
  [
"algoName"]=>
 
string(6) "bcrypt"
 
["options"]=>
  array(
1) {
    [
"cost"]=>
   
int(10)
  }
}

?>
To Top