Download src/php/php-src/Zend/tests/exceptions/exception_016.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 491 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/exceptions/exception_016.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/exceptions/exception_016.phpt
-
curl -L -o exception_016.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/exceptions/exception_016.phpt
491 Bytes
| --TEST-- | |
| Exceptions on improper usage of $this | |
| --FILE-- | |
| try { | |
| $this->foo(); | |
| } catch (Error $e) { | |
| echo "\nException: " . $e->getMessage() . " in " , $e->getFile() . " on line " . $e->getLine() . "\n"; | |
| } | |
| $this->foo(); | |
| --EXPECTF-- | |
| Exception: Using $this when not in object context in %sexception_016.php on line %d | |
| Fatal error: Uncaught Error: Using $this when not in object context in %sexception_016.php:%d | |
| Stack trace: | |
| #0 {main} | |
| thrown in %sexception_016.php on line %d | |