bug55156.phpt 615 B

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