PageRenderTime 44ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/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
Possible License(s): LGPL-2.1, BSD-2-Clause, BSD-3-Clause, MPL-2.0-no-copyleft-exception, MIT, LGPL-2.0, Apache-2.0
  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. }