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