xref: /PHP-7.0/ext/hash/tests/hash_copy_002.phpt (revision df2504b0)
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
18resource(%d) of type (Hash Context)
19
20Warning: hash_copy() expects exactly 1 parameter, 2 given in %s on line %d
21NULL
22Done
23