xref: /PHP-7.2/ext/hash/tests/hash_copy_002.phpt (revision 17ccbeec)
1--TEST--
2hash_copy() errors
3--SKIPIF--
4<?php extension_loaded('hash') or die('skip'); ?>
5--FILE--
6<?php
7
8$r = hash_init("md5");
9var_dump(hash_copy());
10var_dump(hash_copy($r));
11var_dump(hash_copy($r, $r));
12
13echo "Done\n";
14?>
15--EXPECTF--
16Warning: hash_copy() expects exactly 1 parameter, 0 given in %s on line %d
17NULL
18object(HashContext)#%d (0) {
19}
20
21Warning: hash_copy() expects exactly 1 parameter, 2 given in %s on line %d
22NULL
23Done
24