blob: b5c038809139d46838b4b904aaa37c354f681ab1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
--TEST--
Hash: hash() function : error conditions
--FILE--
<?php
echo "*** Testing hash() : error conditions ***\n";
echo "\n-- Testing hash() function with invalid hash algorithm --\n";
try {
hash('foo', '');
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
?>
--EXPECT--
*** Testing hash() : error conditions ***
-- Testing hash() function with invalid hash algorithm --
hash(): Argument #1 ($algo) must be a valid hashing algorithm
|