Download src/php/php-src/Zend/tests/autoload/bug33116.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 337 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/autoload/bug33116.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/autoload/bug33116.phpt
-
curl -L -o bug33116.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/autoload/bug33116.phpt
337 Bytes
| --TEST-- | |
| Bug #33116 (crash when assigning class name to global variable in autoloader) | |
| --FILE-- | |
| spl_autoload_register(function ($class) { | |
| $GLOBALS['include'][] = $class; | |
| eval("class DefClass{}"); | |
| }); | |
| $a = new DefClass; | |
| print_r($a); | |
| print_r($GLOBALS['include']); | |
| --EXPECT-- | |
| DefClass Object | |
| ( | |
| ) | |
| Array | |
| ( | |
| [0] => DefClass | |
| ) | |