mirror of
https://github.com/php/php-src.git
synced 2026-04-17 04:51:03 +02:00
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)
24 lines
434 B
PHP
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
|