xref: /PHP-5.6/ext/reflection/tests/023.phpt (revision 610c7fbe)
1--TEST--
2ReflectionClass::getDefaultProperties (filtering parent privates)
3--SKIPIF--
4<?php extension_loaded('reflection') or die('skip'); ?>
5--FILE--
6<?php
7class C1 {
8	private   $p1 = 1;
9	protected $p2 = 2;
10	public    $p3 = 3;
11}
12class C2 extends C1 {
13	private   $p4 = 4;
14	protected $p5 = 5;
15	public    $p6 = 6;
16}
17$class = new ReflectionClass("C2");
18var_dump($class->getDefaultProperties());
19?>
20--EXPECT--
21array(5) {
22  ["p4"]=>
23  int(4)
24  ["p5"]=>
25  int(5)
26  ["p6"]=>
27  int(6)
28  ["p2"]=>
29  int(2)
30  ["p3"]=>
31  int(3)
32}
33