xref: /PHP-7.0/Zend/tests/exception_021.phpt (revision 4fb36270)
1--TEST--
2Testing throw exception doesn't crash with wrong params, variant 3
3--FILE--
4<?php
5
6class Hello extends Error {}
7throw new Hello(new stdClass);
8
9?>
10--EXPECTF--
11Fatal error: Uncaught Error: Wrong parameters for Hello([string $message [, long $code [, Throwable $previous = NULL]]]) in %sexception_021.php:%d
12Stack trace:
13#0 %sexception_021.php(%d): Error->__construct(Object(stdClass))
14#1 {main}
15  thrown in %sexception_021.php on line %d
16