/hphp/test/zend/good/ext/reflection/tests/bug53915.php

http://github.com/facebook/hiphop-php · PHP · 21 lines · 18 code · 3 blank · 0 comment · 0 complexity · 781ec269aa9a70fca2d4f40a9cfaeeb3 MD5 · raw file

  1. <?hh
  2. class Foo
  3. {
  4. const A = 1;
  5. const B = self::A;
  6. }
  7. class Foo2
  8. {
  9. const A = 1;
  10. const B = self::A;
  11. }
  12. <<__EntryPoint>>
  13. function main_entry(): void {
  14. $rc = new ReflectionClass('Foo');
  15. print_r($rc->getConstants());
  16. $rc = new ReflectionClass('Foo2');
  17. print_r($rc->getConstant('B'));
  18. }