1--TEST--
2Dynamic property shadowed by private property
3--FILE--
4<?php
5
6class Test {
7    private $prop = "Test";
8
9    function run() {
10        foreach ($this as $k => $v) {
11            echo "$k => $v\n";
12        }
13        var_dump(get_object_vars($this));
14    }
15}
16
17#[AllowDynamicProperties]
18class Test2 extends Test {
19}
20
21$test2 = new Test2;
22$test2->prop = "Test2";
23$test2->run();
24
25?>
26--EXPECT--
27prop => Test
28array(1) {
29  ["prop"]=>
30  string(4) "Test"
31}
32