Download src/php/php-src/Zend/tests/exceptions/bug32226.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 485 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/exceptions/bug32226.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/exceptions/bug32226.phpt
-
curl -L -o bug32226.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/exceptions/bug32226.phpt
485 Bytes
| --TEST-- | |
| Bug #32226 (SEGV with exception handler on non existing instance) | |
| --FILE-- | |
| class A | |
| { | |
| public function __construct() | |
| { | |
| set_exception_handler(array($this, 'EH')); | |
| throw new Exception(); | |
| } | |
| public function EH() | |
| { | |
| restore_exception_handler(); | |
| throw new Exception(); | |
| } | |
| } | |
| try | |
| { | |
| $a = new A(); | |
| } | |
| catch(Exception $e) | |
| { | |
| echo "Caught\n"; | |
| } | |
| --EXPECT-- | |
| Caught | |