Download src/php/php-src/ext/phar/tests/023.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 825 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/phar/tests/023.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/phar/tests/023.phpt
-
curl -L -o 023.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/phar/tests/023.phpt
825 Bytes
| --TEST-- | |
| Phar: phar:// file_get_contents | |
| --EXTENSIONS-- | |
| phar | |
| --INI-- | |
| phar.require_hash=0 | |
| --FILE-- | |
| $fname = __DIR__ . '/' . basename(__FILE__, '.php') . '.phar.php'; | |
| $pname = 'phar://' . $fname; | |
| $file = "<?php __HALT_COMPILER(); ?>"; | |
| $files = array(); | |
| $files['a.php'] = '<?php echo "This is a\n"; ?>'; | |
| $files['b.php'] = '<?php echo "This is b\n"; ?>'; | |
| $files['b/c.php'] = '<?php echo "This is b/c\n"; ?>'; | |
| include 'files/phar_test.inc'; | |
| var_dump(file_get_contents($pname . '/a.php')); | |
| var_dump(file_get_contents($pname . '/b.php')); | |
| var_dump(file_get_contents($pname . '/b/c.php')); | |
| --CLEAN-- | |
| unlink(__DIR__ . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); | |
| --EXPECT-- | |
| string(28) " echo "This is a\n"; " | |
| string(28) " echo "This is b\n"; " | |
| string(30) " echo "This is b/c\n"; " | |