Lines Matching refs:hash
2 Hash: hash() function : error conditions
6 /* Prototype : string hash ( string $algo , string $data [, bool $raw_output ] )
7 * Description: Generate a hash value (message digest)
8 * Source code: ext/hash/hash.c
11 echo "*** Testing hash() : error conditions ***\n";
13 echo "\n-- Testing hash() function with less than expected no. of arguments --\n";
14 var_dump(hash());
15 var_dump(hash('adler32'));
17 echo "\n-- Testing hash() function with more than expected no. of arguments --\n";
19 var_dump(hash('adler32', '', false, $extra_arg));
21 echo "\n-- Testing hash() function with invalid hash algorithm --\n";
22 var_dump(hash('foo', ''));
27 *** Testing hash() : error conditions ***
29 -- Testing hash() function with less than expected no. of arguments --
31 Warning: hash() expects at least 2 parameters, 0 given in %s on line %d
34 Warning: hash() expects at least 2 parameters, 1 given in %s on line %d
37 -- Testing hash() function with more than expected no. of arguments --
39 Warning: hash() expects at most 3 parameters, 4 given in %s on line %d
42 -- Testing hash() function with invalid hash algorithm --
44 Warning: hash(): Unknown hashing algorithm: foo in %s on line %d