bug55156.phpt 615 B

123456789101112131415161718192021222324252627282930313233
  1. --TEST--
  2. Bug #55156 (ReflectionClass::getDocComment() returns comment even though the class has none)
  3. --INI--
  4. opcache.save_comments=1
  5. opcache.load_comments=1
  6. --FILE--
  7. <?php
  8. /** test */
  9. namespace foo {
  10. function test() { }
  11. $x = new \ReflectionFunction('foo\test');
  12. var_dump($x->getDocComment());
  13. /** test1 */
  14. class bar { }
  15. /** test2 */
  16. class foo extends namespace\bar { }
  17. $x = new \ReflectionClass('foo\bar');
  18. var_dump($x->getDocComment());
  19. $x = new \ReflectionClass('foo\foo');
  20. var_dump($x->getDocComment());
  21. }
  22. ?>
  23. --EXPECTF--
  24. bool(false)
  25. string(12) "/** test1 */"
  26. string(12) "/** test2 */"