Download src/php/php-src/Zend/tests/exceptions/bug48408.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 476 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/exceptions/bug48408.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/exceptions/bug48408.phpt
-
curl -L -o bug48408.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/exceptions/bug48408.phpt
476 Bytes
| --TEST-- | |
| Bug #48408 (crash when exception is thrown while passing function arguments) | |
| --FILE-- | |
| class B{ | |
| public function process($x){ | |
| return $x; | |
| } | |
| } | |
| class C{ | |
| public function generate($x){ | |
| throw new Exception; | |
| } | |
| } | |
| $b = new B; | |
| $c = new C; | |
| try{ | |
| $b->process($c->generate(0)); | |
| } | |
| catch(Exception $e){ | |
| $c->generate(0); | |
| } | |
| --EXPECTF-- | |
| Fatal error: Uncaught Exception in %s | |
| Stack trace: | |
| #0 %s(%d): C->generate(0) | |
| #1 {main} | |
| thrown in %s | |