global statement removal: hphp/test [7/x]
[hiphop-php.git] / hphp / test / quick / prop_ctx.php
blob8541e5e2234a28396b1eb1c49f6a7f6d25c6fcc2
1 <?hh
3 trait t {
4 public static function f($o) {
5 var_dump($o->prop);
7 public static function set($o, $v) {
8 $o->prop = $v;
9 var_dump($o);
13 class a {
14 use t;
15 private $prop = 'I am private in a';
18 class b extends a {
19 public $prop = 'I am public in b';
22 function main() {
23 $b = new b();
24 $b->f($b);
25 t::f($b);
27 $b->set($b, 'new value');
28 t::set($b, 'newer value');
30 $a = new a();
31 $a->f($a);
32 t::f($a);
34 main();