Guest User

Untitled

a guest
Nov 22nd, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. fredemmott-pro:hhtest fredemmott$ hhvm --version
  2. HipHop VM 3.23.2-0brew (rel)
  3. Compiler: 1511205649_N
  4. Repo schema: ec6e576aec2517122b203aece1c3a968530d66be
  5. fredemmott-pro:hhtest fredemmott$ hhvm test.php
  6. object(Foo)#1 (0) {
  7. }
  8. object(Foo)#1 (0) {
  9. }
  10. fredemmott-pro:hhtest fredemmott$ cat test.php
  11. <?hh
  12.  
  13. <<__ConsistentConstruct>>
  14. class Foo {
  15. <<__Memoize>>
  16. final public static function get(): this {
  17. return new static();
  18. }
  19. }
  20.  
  21. class Bar extends Foo {}
  22. class Baz extends Foo {}
  23.  
  24. var_dump(Bar::get(), Baz::get());
Add Comment
Please, Sign In to add comment