Download src/php/php-src/Zend/tests/autoload/bug63741.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 763 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/autoload/bug63741.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/autoload/bug63741.phpt
-
curl -L -o bug63741.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/autoload/bug63741.phpt
763 Bytes
| --TEST-- | |
| Bug #63741 (Crash when autoloading from spl) | |
| --FILE-- | |
| file_put_contents(__DIR__."/bug63741.tmp.php", | |
| <<<'EOT' | |
| <?php | |
| if (isset($autoloading)) | |
| { | |
| class ClassToLoad | |
| { | |
| static function func () | |
| { | |
| print "OK!\n"; | |
| } | |
| } | |
| return; | |
| } | |
| else | |
| { | |
| class autoloader | |
| { | |
| static function autoload($classname) | |
| { | |
| print "autoloading...\n"; | |
| $autoloading = true; | |
| include __FILE__; | |
| } | |
| } | |
| spl_autoload_register(["autoloader", "autoload"]); | |
| function start() | |
| { | |
| ClassToLoad::func(); | |
| } | |
| start(); | |
| } | |
| ?> | |
| EOT | |
| ); | |
| include __DIR__."/bug63741.tmp.php"; | |
| --CLEAN-- | |
| unlink(__DIR__."/bug63741.tmp.php"); | |
| --EXPECT-- | |
| autoloading... | |
| OK! | |