bug50174.phpt 552 B

123456789101112131415161718192021222324252627282930313233
  1. --TEST--
  2. Bug #50174 (Incorrectly matched docComment)
  3. --SKIPIF--
  4. <?php if (!extension_loaded('reflection') || !extension_loaded('spl')) print "skip SPL and reflection extensions required"; ?>
  5. --FILE--
  6. <?php
  7. class TestClass
  8. {
  9. /** const comment */
  10. const C = 0;
  11. function x() {}
  12. }
  13. $rm = new ReflectionMethod('TestClass', 'x');
  14. var_dump($rm->getDocComment());
  15. class TestClass2
  16. {
  17. /** const comment */
  18. const C = 0;
  19. public $x;
  20. }
  21. $rp = new ReflectionProperty('TestClass2', 'x');
  22. var_dump($rp->getDocComment());
  23. ?>
  24. --EXPECT--
  25. bool(false)
  26. bool(false)