Download src/php/php-src/Zend/tests/backtrace/bug79108.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 406 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/backtrace/bug79108.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/backtrace/bug79108.phpt
-
curl -L -o bug79108.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/backtrace/bug79108.phpt
406 Bytes
| --TEST-- | |
| Bug #79108: Referencing argument in a function makes it a reference in the stack trace | |
| --FILE-- | |
| function test(string $val) { | |
| $a = &$val; | |
| hackingHere(); | |
| print_r($val); | |
| } | |
| function hackingHere() { | |
| // we're able to modify the $val from here, even though the arg was not a reference | |
| debug_backtrace()[1]['args'][0] = 'Modified'; | |
| } | |
| test('Original'); | |
| --EXPECT-- | |
| Original | |