xref: /PHP-8.2/Zend/tests/exception_018.phpt (revision fbe30592)
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 TypeError: Exception::__construct(): Argument #1 ($message) must be of type string, stdClass given in %s:%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