1--TEST--
2ReflectionParameter::isDefault()
3--FILE--
4<?php
5class A {
6public $defprop;
7}
8$a = new A;
9$a->myprop = null;
10
11$ro = new ReflectionObject($a);
12$props = $ro->getProperties();
13$prop1 = $props[0];
14var_dump($prop1->isDefault());
15$prop2 = $props[1];
16var_dump($prop2->isDefault());
17
18var_dump($ro->getProperty('defprop')->isDefault());
19var_dump($ro->getProperty('myprop')->isDefault());
20
21$prop1 = new ReflectionProperty($a, 'defprop');
22$prop2 = new ReflectionProperty($a, 'myprop');
23var_dump($prop1->isDefault());
24var_dump($prop2->isDefault());
25?>
26--EXPECT--
27bool(true)
28bool(false)
29bool(true)
30bool(false)
31bool(true)
32bool(false)
33