xref: /PHP-8.0/Zend/tests/exception_022.phpt (revision fbe30592)
1--TEST--
2Testing throw exception doesn't crash with wrong params, variant 4
3--FILE--
4<?php
5
6throw new Error(new stdClass);
7
8?>
9--EXPECTF--
10Fatal error: Uncaught TypeError: Error::__construct(): Argument #1 ($message) must be of type string, stdClass given in %s:%d
11Stack trace:
12#0 %sexception_022.php(%d): Error->__construct(Object(stdClass))
13#1 {main}
14  thrown in %sexception_022.php on line %d
15