3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?hh class A { static protected function f() {return 'A::f()';} } class B1 extends A { static protected function f() {return 'B1::f()';} } class B2 extends A { static public function test() {echo B1::f();} } B2::test();
Output for hhvm-3.12.0
B1::f()
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.4.34
Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/jJBLC on line 2
Process exited with code 255.
Output for 5.4.0 - 5.4.32
<?hh class A { static protected function f() {return 'A::f()';} } class B1 extends A { static protected function f() {return 'B1::f()';} } class B2 extends A { static public function test() {echo B1::f();} } B2::test();