xref: /PHP-7.1/ext/reflection/tests/bug74673.phpt (revision 9c5717d0)
1--TEST--
2Bug #74673 (Segfault when cast Reflection object to string with undefined constant)
3--FILE--
4<?php
5
6set_error_handler(function() {
7    throw new Exception();
8});
9
10class A
11{
12	public function method($test = PHP_SELF + 1)
13	{
14	}
15}
16
17$class = new ReflectionClass('A');
18
19echo $class;
20?>
21--EXPECTF--
22Fatal error: Method ReflectionClass::__toString() must not throw an exception, caught Exception:  in %sbug74673.php on line %d
23