Download src/php/php-src/tests/lang/042.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/tests/lang/042.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/tests/lang/042.phpt
-
curl -L -o 042.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/tests/lang/042.phpt
337 Bytes
| --TEST-- | |
| Dynamic access of constants | |
| --FILE-- | |
| class A { | |
| const B = 'foo'; | |
| } | |
| $classname = 'A'; | |
| $wrongClassname = 'B'; | |
| echo $classname::B."\n"; | |
| echo $wrongClassname::B."\n"; | |
| ===DONE=== | |
| --EXPECTF-- | |
| foo | |
| Fatal error: Uncaught Error: Class "B" not found in %s:%d | |
| Stack trace: | |
| #0 {main} | |
| thrown in %s042.php on line %d | |