Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
20 lines (19 sloc) 501 Bytes
--TEST--
Test error operation of password_hash() with bcrypt hashing
--FILE--
<?php
//-=-=-=-
try {
password_hash("foo", PASSWORD_BCRYPT, array("cost" => 3));
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
try {
var_dump(password_hash("foo", PASSWORD_BCRYPT, array("cost" => 32)));
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
?>
--EXPECT--
Invalid bcrypt cost parameter specified: 3
Invalid bcrypt cost parameter specified: 32