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 error operation of password_needs_rehash() --FILE-- <?php try { var_dum..
Decoded Output download
--TEST--
Test error operation of password_needs_rehash()
--FILE--
<?php
try {
var_dump(password_needs_rehash(''));
} catch (TypeError $e) {
echo $e->getMessage(), "
";
}
try {
var_dump(password_needs_rehash('', []));
} catch (TypeError $e) {
echo $e->getMessage(), "
";
}
try {
var_dump(password_needs_rehash(array(), PASSWORD_BCRYPT));
} catch (TypeError $e) {
echo $e->getMessage(), "
";
}
try {
var_dump(password_needs_rehash("", PASSWORD_BCRYPT, "foo"));
} catch (TypeError $e) {
echo $e->getMessage(), "
";
}
echo "OK!";
?>
--EXPECT--
password_needs_rehash() expects at least 2 arguments, 1 given
password_needs_rehash(): Argument #2 ($algo) must be of type string|int|null, array given
password_needs_rehash(): Argument #1 ($hash) must be of type string, array given
password_needs_rehash(): Argument #3 ($options) must be of type array, string given
OK!
Did this file decode correctly?
Original Code
--TEST--
Test error operation of password_needs_rehash()
--FILE--
<?php
try {
var_dump(password_needs_rehash(''));
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
try {
var_dump(password_needs_rehash('', []));
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
try {
var_dump(password_needs_rehash(array(), PASSWORD_BCRYPT));
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
try {
var_dump(password_needs_rehash("", PASSWORD_BCRYPT, "foo"));
} catch (TypeError $e) {
echo $e->getMessage(), "\n";
}
echo "OK!";
?>
--EXPECT--
password_needs_rehash() expects at least 2 arguments, 1 given
password_needs_rehash(): Argument #2 ($algo) must be of type string|int|null, array given
password_needs_rehash(): Argument #1 ($hash) must be of type string, array given
password_needs_rehash(): Argument #3 ($options) must be of type array, string given
OK!
Function Calls
None |
Stats
MD5 | 3f4d13dc03319bd41a49aa282c18d7ac |
Eval Count | 0 |
Decode Time | 69 ms |