Download src/php/php-src/Zend/tests/exceptions/bug70944.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 716 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/exceptions/bug70944.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/Zend/tests/exceptions/bug70944.phpt
-
curl -L -o bug70944.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/Zend/tests/exceptions/bug70944.phpt
716 Bytes
| --TEST-- | |
| Bug #70944 (try{ } finally{} can create infinite chains of exceptions) | |
| --FILE-- | |
| try { | |
| $e = new Exception("Foo"); | |
| try { | |
| throw new Exception("Bar", 0, $e); | |
| } finally { | |
| throw $e; | |
| } | |
| } catch (Exception $e) { | |
| var_dump((string)$e); | |
| } | |
| try { | |
| $e = new Exception("Foo"); | |
| try { | |
| throw new Exception("Bar", 0, $e); | |
| } finally { | |
| throw new Exception("Dummy", 0, $e); | |
| } | |
| } catch (Exception $e) { | |
| var_dump((string)$e); | |
| } | |
| --EXPECTF-- | |
| string(%d) "Exception: Foo in %sbug70944.php:%d | |
| Stack trace: | |
| #0 {main}" | |
| string(%d) "Exception: Foo in %sbug70944.php:%d | |
| Stack trace: | |
| #0 {main} | |
| Next Exception: Dummy in %sbug70944.php:%d | |
| Stack trace: | |
| #0 {main}" | |