Download src/php/php-src/ext/phar/tests/016b.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 730 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/phar/tests/016b.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/phar/tests/016b.phpt
-
curl -L -o 016b.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/phar/tests/016b.phpt
730 Bytes
| --TEST-- | |
| Phar::mapPhar invalid file (gzipped file length is too short) | |
| --EXTENSIONS-- | |
| phar | |
| zlib | |
| --INI-- | |
| phar.require_hash=0 | |
| --FILE-- | |
| $fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; | |
| $pname = 'phar://' . $fname; | |
| $file = "<?php __HALT_COMPILER(); ?>"; | |
| // file length is too short | |
| $files = array(); | |
| $files['a'] = array('cont'=>'a','flags'=>0x00001000, 'clen' => 1); | |
| include 'files/phar_test.inc'; | |
| echo file_get_contents($pname . '/a'); | |
| --CLEAN-- | |
| unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); | |
| --EXPECTF-- | |
| Warning: file_get_contents(phar://%s/a): Failed to open stream: phar error: internal corruption of phar "%s" (actual filesize mismatch on file "a") in %s on line %d | |