mirror of
https://github.com/php/php-src.git
synced 2026-10-28 17:56:50 +08:00
* ext/bz2: applied fixers to improve test robustness * ext/calendar: applied fixers to improve test robustness * ext/exif: applied fixers to improve test robustness * ext/fileinfo: applied fixers to improve test robustness * ext/filter: applied fixers to improve test robustness * ext/ftp: applied fixers to improve test robustness * ext/hash: applied fixers to improve test robustness * ext/iconv: applied fixers to improve test robustness * ext/ldap: applied fixers to improve test robustness * ext/pcre: applied fixers to improve test robustness * ext/posix: applied fixers to improve test robustness * ext/readline: applied fixers to improve test robustness * ext/shmop: applied fixers to improve test robustness * ext/snmp: applied fixers to improve test robustness * ext/sodium: applied fixers to improve test robustness * ext/sqlite3: applied fixers to improve test robustness * ext/sysvmsg: applied fixers to improve test robustness * ext/sysvsem: applied fixers to improve test robustness * ext/sysvshm: applied fixers to improve test robustness * ext/tidy: applied fixers to improve test robustness * ext/tokenizer: applied fixers to improve test robustness * ext/zend_test: applied fixers to improve test robustness * ext/zlib: applied fixers to improve test robustness
21 lines
508 B
PHP
21 lines
508 B
PHP
--TEST--
|
|
Hash: hash() function : error conditions
|
|
--FILE--
|
|
<?php
|
|
|
|
echo "*** Testing hash() : error conditions ***\n";
|
|
|
|
echo "\n-- Testing hash() function with invalid hash algorithm --\n";
|
|
try {
|
|
hash('foo', '');
|
|
} catch (ValueError $exception) {
|
|
echo $exception::class, ': ', $exception->getMessage(), "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
*** Testing hash() : error conditions ***
|
|
|
|
-- Testing hash() function with invalid hash algorithm --
|
|
ValueError: hash(): Argument #1 ($algo) must be a valid hashing algorithm
|