Download src/php/php-src/ext/hash/tests/hash_update_file.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 515 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/hash/tests/hash_update_file.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/hash/tests/hash_update_file.phpt
-
curl -L -o hash_update_file.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/hash/tests/hash_update_file.phpt
515 Bytes
| --TEST-- | |
| Hash: hash_update_file() test | |
| --CREDITS-- | |
| marcosptf - <marcosptf@yahoo.com.br> - @phpsp - sao paulo - br | |
| --FILE-- | |
| $filePath = __DIR__ . DIRECTORY_SEPARATOR . 'hash_update_stream.txt'; | |
| file_put_contents($filePath, 'The quick brown fox jumped over the lazy dog.'); | |
| $ctx = hash_init('md5'); | |
| var_dump(hash_update_file($ctx, $filePath)); | |
| echo hash_final($ctx); | |
| --EXPECT-- | |
| bool(true) | |
| 5c6ffbdd40d9556b73a21e63c3e0e904 | |
| --CLEAN-- | |
| unlink(__DIR__ . DIRECTORY_SEPARATOR . 'hash_update_stream.txt'); | |