1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 06:51:18 +02:00
Files
archived-php-src/Zend/tests/exception_019.phpt
2020-04-26 00:25:42 +02:00

15 lines
406 B
PHP

--TEST--
Testing throw exception doesn't crash with wrong params, variant 2
--FILE--
<?php
throw new Exception(new stdClass);
?>
--EXPECTF--
Fatal error: Uncaught TypeError: Exception::__construct(): Argument #1 ($message) must be of type string, object given in %s:%d
Stack trace:
#0 %sexception_019.php(%d): Exception->__construct(Object(stdClass))
#1 {main}
thrown in %sexception_019.php on line %d