Download src/php/php-src/Zend/tests/dynamic_call/bug52940.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 366 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/dynamic_call/bug52940.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/dynamic_call/bug52940.phpt
-
curl -L -o bug52940.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/dynamic_call/bug52940.phpt
366 Bytes
| --TEST-- | |
| Bug #52940 (call_user_func_array still allows call-time pass-by-reference) | |
| --FILE-- | |
| function foo($a) { | |
| $a++; | |
| var_dump($a); | |
| } | |
| function bar(&$a) { | |
| $a++; | |
| var_dump($a); | |
| } | |
| $a = 1; | |
| call_user_func_array("foo", array(&$a)); | |
| var_dump($a); | |
| call_user_func_array("bar", array(&$a)); | |
| var_dump($a); | |
| --EXPECT-- | |
| int(2) | |
| int(1) | |
| int(2) | |
| int(2) | |