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