1
0
mirror of https://github.com/php/php-src.git synced 2026-04-17 04:51:03 +02:00
Files
archived-php-src/ext/hash/tests/hash_copy_002.phpt
=?UTF-8?q?Rouven=20We=C3=9Fling?= b7f59be9f4 Refactor HashContext into an object.
This allows better type hinting as well as potentially adding
methods in a followup diff.

Original patch by Rouven Weßling (github.com/realityking)
Heavily modified by Sara Golemon (github.com/sgolemon)
2017-01-31 19:28:35 -08:00

24 lines
434 B
PHP

--TEST--
hash_copy() errors
--SKIPIF--
<?php extension_loaded('hash') or die('skip'); ?>
--FILE--
<?php
$r = hash_init("md5");
var_dump(hash_copy());
var_dump(hash_copy($r));
var_dump(hash_copy($r, $r));
echo "Done\n";
?>
--EXPECTF--
Warning: hash_copy() expects exactly 1 parameter, 0 given in %s on line %d
NULL
object(HashContext)#%d (0) {
}
Warning: hash_copy() expects exactly 1 parameter, 2 given in %s on line %d
NULL
Done