3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?hh class A { <<__Memoize>> public static function get() { return new static(); } } final class B extends A { } final class C extends A { } var_dump(A::get()); var_dump(B::get()); var_dump(C::get());
based on oeuq0
Output for 5.4.34
Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/RBY7X on line 3
Process exited with code 255.
Output for 5.4.0 - 5.4.32
<?hh class A { <<__Memoize>> public static function get() { return new static(); } } final class B extends A { } final class C extends A { } var_dump(A::get()); var_dump(B::get()); var_dump(C::get());