blob: f879d491d79a85d07a3cda142f0549d8296603be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
--TEST--
Hash: hash() function : error conditions
--FILE--
<?php
/* Prototype : string hash ( string $algo , string $data [, bool $raw_output ] )
* Description: Generate a hash value (message digest)
* Source code: ext/hash/hash.c
* Alias to functions:
*/
echo "*** Testing hash() : error conditions ***\n";
echo "\n-- Testing hash() function with invalid hash algorithm --\n";
var_dump(hash('foo', ''));
?>
===Done===
--EXPECTF--
*** Testing hash() : error conditions ***
-- Testing hash() function with invalid hash algorithm --
Warning: hash(): Unknown hashing algorithm: foo in %s on line %d
bool(false)
===Done===
|