xref: /PHP-8.1/Zend/tests/exception_020.phpt (revision fbe30592)
1--TEST--
2Test that the original class name is present in the error out when extending ErrorException
3--FILE--
4<?php
5
6class MyErrorException extends ErrorException{}
7throw new MyErrorException(new stdClass);
8
9?>
10--EXPECTF--
11Fatal error: Uncaught TypeError: ErrorException::__construct(): Argument #1 ($message) must be of type string, stdClass given in %s:%d
12Stack trace:
13#0 %sexception_020.php(%d): ErrorException->__construct(Object(stdClass))
14#1 {main}
15  thrown in %sexception_020.php on line %d
16