Download src/php/php-src/Zend/tests/autoload/bug65322.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 595 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/autoload/bug65322.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/autoload/bug65322.phpt
-
curl -L -o bug65322.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/autoload/bug65322.phpt
595 Bytes
| --TEST-- | |
| Bug #65322: compile time errors won't trigger auto loading | |
| --FILE-- | |
| spl_autoload_register(function($class) { | |
| var_dump($class); | |
| class X {} | |
| }); | |
| set_error_handler(function($_, $msg, $file) { | |
| var_dump($msg, $file); | |
| new X; | |
| }); | |
| /* This is just a particular example of a non-fatal compile-time error | |
| * If this breaks in future, just find another example and use it instead */ | |
| eval('class A { private function __invoke() { } }'); | |
| --EXPECTF-- | |
| string(%d) "The magic method A::__invoke() must have public visibility" | |
| string(%d) "%s(%d) : eval()'d code" | |
| string(1) "X" | |