global statement removal: hphp/test [7/x]
[hiphop-php.git] / hphp / test / quick / lsb_static_protected.php
blob008aa5b86add3c3e708b4baf56b47c60493aad00
1 <?hh
3 class A {
4 <<__LSB>> protected static string $x = null;
6 static function init() {
7 if (static::$x === null) static::$x = static::class;
10 static function afunc() {
11 static::init();
12 var_dump(self::$x . " " . static::$x);
15 static function apeek() {
16 var_dump(A::$x . " " . B::$x);
20 class B extends A {
21 static function bfunc() {
22 static::init();
23 var_dump(self::$x . " " . static::$x);
26 static function bpeek() {
27 var_dump(A::$x . " " . B::$x);
31 A::afunc();
32 B::afunc();
33 B::bfunc();
35 A::apeek();
36 B::bpeek();
38 var_dump(B::$x);