Download src/php/php-src/Zend/tests/exceptions/exception_009.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 674 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/exceptions/exception_009.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/exceptions/exception_009.phpt
-
curl -L -o exception_009.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/exceptions/exception_009.phpt
674 Bytes
| --TEST-- | |
| Testing exception properties | |
| --FILE-- | |
| class my_file | |
| { | |
| public function __toString() | |
| { | |
| return "somebuildfilename" ; | |
| } | |
| } | |
| class my_exception extends exception | |
| { | |
| public function __construct() | |
| { | |
| $this->message = new stdclass ; | |
| $this->file = new my_file ; | |
| $this->line = "12" ; | |
| } | |
| } | |
| throw new my_exception; | |
| --EXPECT-- | |
| Fatal error: Uncaught Error: Object of class stdClass could not be converted to string in [no active file]:0 | |
| Stack trace: | |
| #0 [internal function]: Exception->__toString() | |
| #1 {main} | |
| thrown in [no active file] on line 0 | |