Download src/php/php-src/ext/hash/tests/hash_error.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 472 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/hash/tests/hash_error.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/hash/tests/hash_error.phpt
-
curl -L -o hash_error.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/hash/tests/hash_error.phpt
472 Bytes
| --TEST-- | |
| Hash: hash() function : error conditions | |
| --FILE-- | |
| echo "*** Testing hash() : error conditions ***\n"; | |
| echo "\n-- Testing hash() function with invalid hash algorithm --\n"; | |
| try { | |
| hash('foo', ''); | |
| } catch (ValueError $exception) { | |
| echo $exception->getMessage() . "\n"; | |
| } | |
| --EXPECT-- | |
| *** Testing hash() : error conditions *** | |
| -- Testing hash() function with invalid hash algorithm -- | |
| hash(): Argument #1 ($algo) must be a valid hashing algorithm | |