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