1
0
mirror of https://github.com/php/php-src.git synced 2026-03-30 12:13:02 +02:00
Files
archived-php-src/ext/hash/tests/hash_error.phpt
2019-03-11 11:32:20 +01:00

26 lines
632 B
PHP

--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===