PageRenderTime 46ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/hphp/test/zend/bad/ext/reflection/tests/bug63614.php

http://github.com/facebook/hiphop-php
PHP | 22 lines | 19 code | 3 blank | 0 comment | 0 complexity | 2d32fb71e2eef12f0d2e8a2fe7362717 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. <?php
  2. function dummy() {
  3. static $a = array();
  4. }
  5. class Test
  6. {
  7. const A = 0;
  8. public function func()
  9. {
  10. static $a = array(
  11. self::A => 'a'
  12. );
  13. }
  14. }
  15. $reflect = new ReflectionFunction("dummy");
  16. print_r($reflect->getStaticVariables());
  17. $reflect = new ReflectionMethod('Test', 'func');
  18. print_r($reflect->getStaticVariables());
  19. ?>