Download src/php/php-src/tests/classes/autoload_009.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 460 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/tests/classes/autoload_009.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/tests/classes/autoload_009.phpt
-
curl -L -o autoload_009.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/tests/classes/autoload_009.phpt
460 Bytes
| --TEST-- | |
| Ensure type hints for unknown types do not trigger autoload. | |
| --FILE-- | |
| spl_autoload_register(function ($name) { | |
| echo "In autoload: "; | |
| var_dump($name); | |
| }); | |
| function f(UndefClass $x) | |
| { | |
| } | |
| f(new stdClass); | |
| --EXPECTF-- | |
| Fatal error: Uncaught TypeError: f(): Argument #1 ($x) must be of type UndefClass, stdClass given, called in %s on line %d and defined in %s:%d | |
| Stack trace: | |
| #0 %s(%d): f(Object(stdClass)) | |
| #1 {main} | |
| thrown in %s on line %d | |