Enforce modularity boundaries for classes
[hiphop-php.git] / hphp / test / slow / object_property_expression / 798.php
blob4d4b7bf6371ffe00ca14dd4cd16a40e49cd69238
1 <?hh
3 class Y {
5 class X {
6 public $a;
7 function __construct() {
8 $this->a = darray['x' => new Y];
10 function bar() {
11 var_dump('bar');
12 $this->qq = new Y;
13 $this->qq->x = $this->qq->y = 1;
14 return $this->qq;
17 function foo() {
18 var_dump('foo');
19 return 'foo';
21 function test($x, $a, $s) {
22 unset($x->bar()->x);
23 try {
24 unset($x->q->r->s->$foo);
25 } catch (UndefinedVariableException $e) {
26 var_dump($e->getMessage());
28 unset($x->y->a->b->c);
29 unset($x->a['x']->y->a->b->c);
30 unset($a['a']['y'][foo()]);
31 unset($a['b']->y->z);
32 unset($a->c->d);
33 var_dump($x, $a, $s);
36 <<__EntryPoint>>
37 function main_798() {
38 $s = false;
39 test(new X, varray[], $s);