summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/bug74673.phpt
blob: a8b9d998ca768033c9c1838caf50338b2c71a551 (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

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

$class = new ReflectionClass('A');

echo $class;
?>
--EXPECTF--
Fatal error: Uncaught Error: Undefined constant "PHP_SELF" in %s:%d
Stack trace:
#0 %s(%d): ReflectionClass->__toString()
#1 {main}
  thrown in %s on line %d