Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- Test normal operation of password_hash() --FILE-- <?php //-=-=-=- var_dump(strle..

Decoded Output download

--TEST--
Test normal operation of password_hash()
--FILE--
<?php
//-=-=-=-

var_dump(strlen(password_hash("foo", PASSWORD_BCRYPT)));

$algos = [
  PASSWORD_BCRYPT,
  '2y',
  1,
];

foreach ($algos as $algo) {
  $hash = password_hash("foo", $algo);
  var_dump($hash === crypt("foo", $hash));
}

echo "OK!";
?>
--EXPECT--
int(60)
bool(true)
bool(true)
bool(true)
OK!

Did this file decode correctly?

Original Code

--TEST--
Test normal operation of password_hash()
--FILE--
<?php
//-=-=-=-

var_dump(strlen(password_hash("foo", PASSWORD_BCRYPT)));

$algos = [
  PASSWORD_BCRYPT,
  '2y',
  1,
];

foreach ($algos as $algo) {
  $hash = password_hash("foo", $algo);
  var_dump($hash === crypt("foo", $hash));
}

echo "OK!";
?>
--EXPECT--
int(60)
bool(true)
bool(true)
bool(true)
OK!

Function Calls

None

Variables

None

Stats

MD5 daa0324a598391d1ce3cfef160a53f3a
Eval Count 0
Decode Time 105 ms