PHP :: Bug #50174 :: Incorrectly matched docComment
| Bug #50174 | Incorrectly matched docComment | ||||
|---|---|---|---|---|---|
| Submitted: | 2009-11-14 05:18 UTC | Modified: | 2009-11-14 19:17 UTC | ||
| From: | david at grudl dot com | Assigned: | felipe (profile) | ||
| Status: | Closed | Package: | Reflection related | ||
| PHP Version: | 5.2, 5.3, 6 | OS: | |||
| Private report: | No | CVE-ID: | None | ||
[2009-11-14 05:18 UTC] david at grudl dot com
Description:
------------
ReflectionMethod and ReflectionProperty may return invalid phpDocComment. See examples:
Reproduce code:
---------------
1)
class TestClass
{
/** const comment */
const C = 0;
function x() {}
}
$rm = new ReflectionMethod('TestClass', 'x');
echo $rm->getDocComment();
// OR
2)
class TestClass
{
/** const comment */
const C = 0;
var $x;
}
$rp = new ReflectionProperty('TestClass', 'x');
echo $rp->getDocComment();
Expected result:
----------------
FALSE
Actual result:
--------------
/** const comment */
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2009-11-14 19:17 UTC] felipe@php.net