Download src/php/php-src/Zend/tests/exceptions/exception_004.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 344 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/exceptions/exception_004.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/exceptions/exception_004.phpt
-
curl -L -o exception_004.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/exceptions/exception_004.phpt
344 Bytes
| --TEST-- | |
| Throwing exception using a class that isn't derived from the Exception base class | |
| --FILE-- | |
| class Foo { } | |
| try { | |
| throw new Foo(); | |
| } catch (Foo $e) { | |
| var_dump($e); | |
| } | |
| --EXPECTF-- | |
| Fatal error: Uncaught Error: Cannot throw objects that do not implement Throwable in %s:%d | |
| Stack trace: | |
| #0 {main} | |
| thrown in %s on line %d | |