xref: /PHP-7.3/Zend/tests/exception_018.phpt (revision 84865056)
1--TEST--
2Testing throw exception doesn't crash with wrong params, variant 1
3--FILE--
4<?php
5
6class Hello extends Exception {}
7throw new Hello(new stdClass);
8
9?>
10--EXPECTF--
11Fatal error: Uncaught Error: Wrong parameters for Hello([string $message [, long $code [, Throwable $previous = NULL]]]) in %sexception_018.php:%d
12Stack trace:
13#0 %sexception_018.php(%d): Exception->__construct(Object(stdClass))
14#1 {main}
15  thrown in %sexception_018.php on line %d
16