Download src/php/php-src/tests/lang/041.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 357 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/tests/lang/041.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/tests/lang/041.phpt
-
curl -L -o 041.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/tests/lang/041.phpt
357 Bytes
| --TEST-- | |
| Dynamic access of static members | |
| --FILE-- | |
| class A { | |
| public static $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 %s041.php on line %d | |