1--TEST--
2Handling of new in constant expressions in reflection
3--FILE--
4<?php
5
6function test1() {
7    static $x = new stdClass;
8    return $x;
9}
10
11$rf = new ReflectionFunction('test1');
12$s = $rf->getStaticVariables();
13var_dump($s['x'] === test1());
14
15function test2($x = new stdClass) {
16    return $x;
17}
18
19$rf = new ReflectionFunction('test2');
20$rp = $rf->getParameters()[0];
21// Parameter default should *not* be the same.
22var_dump($rp->getDefaultValue() !== test2());
23
24?>
25--EXPECT--
26bool(true)
27bool(true)
28