Download src/php/php-src/tests/classes/abstract.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 550 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/tests/classes/abstract.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/tests/classes/abstract.phpt
-
curl -L -o abstract.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/tests/classes/abstract.phpt
550 Bytes
| --TEST-- | |
| ZE2 An abstract method may not be called | |
| --FILE-- | |
| <?php | |
| abstract class fail { | |
| abstract function show(); | |
| } | |
| class pass extends fail { | |
| function show() { | |
| echo "Call to function show()\n"; | |
| } | |
| function error() { | |
| parent::show(); | |
| } | |
| } | |
| $t = new pass(); | |
| $t->show(); | |
| $t->error(); | |
| echo "Done\n"; // shouldn't be displayed | |
| ?> | |
| --EXPECTF-- | |
| Call to function show() | |
| Fatal error: Uncaught Error: Cannot call abstract method fail::show() in %s:%d | |
| Stack trace: | |
| #0 %s(%d): pass->error() | |
| #1 {main} | |
| thrown in %s on line %d | |