summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/bug74673.phpt
blob: 8e4e8e3a1828b568be1c7160aae75c7bd0cd27de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
Bug #74673 (Segfault when cast Reflection object to string with undefined constant)
--FILE--
<?php

set_error_handler(function() {
    throw new Exception();
});

class A
{
	public function method($test = PHP_SELF + 1)
	{
	}
}

$class = new ReflectionClass('A');

echo $class;
?>
--EXPECTF--
Fatal error: Method ReflectionClass::__toString() must not throw an exception, caught Exception:  in %sbug74673.php on line %d