xref: /PHP-7.4/Zend/tests/throwable_001.phpt (revision d679f022)
1--TEST--
2Test using an Error as the previous Throwable for an Exception
3--CREDITS--
4Aaron Piotrowski <aaron@icicle.io>
5--FILE--
6<?php
7throw new Exception('Exception message', 0, new Error('Error message'));
8?>
9--EXPECTF--
10Fatal error: Uncaught Error: Error message in %s:%d
11Stack trace:
12#0 {main}
13
14Next Exception: Exception message in %s:%d
15Stack trace:
16#0 {main}
17  thrown in %s on line %d
18