1--TEST--
2Testing indirect property access
3--FILE--
4<?php
5
6class foo {
7	public $x = 1;
8}
9
10class bar {
11	public $y = 'foo';
12}
13
14$x = 'bar';
15
16$bar = new bar;
17
18var_dump((new bar)->y);     // foo
19var_dump((new $x)->y);      // foo
20var_dump((new $bar->y)->x); // 1
21
22?>
23--EXPECT--
24string(3) "foo"
25string(3) "foo"
26int(1)
27