#34243 [Asn]: ReflectionClass::getDocComment() returns no result
| From: | johannes@php.net | Date: | Fri, 26 Aug 2005 19:03:30 +0000 |
| Subject: | #34243 [Asn]: ReflectionClass::getDocComment() returns no result | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-84042@lists.php.net to get a copy of this message | ||
ID: 34243
Updated by: johannes@php.net
Reported By: colin at encode dot net dot au
Status: Assigned
Bug Type: Scripting Engine problem
Operating System: *
PHP Version: 5.1.0RC1
Assigned To: helly
New Comment:
Reverting
http://cvs.php.net/diff.php/ZendEngine2/zend_language_parser.y?r1=1.109&r2=1.110&ty=u
seems to fix it - at least after reverting it I couldn't
create any not-working test case.
Previous Comments:
------------------------------------------------------------------------
[2005-08-25 15:20:30] sniper@php.net
Assigned to the maintainer.
------------------------------------------------------------------------
[2005-08-25 02:27:32] colin at encode dot net dot au
Description:
------------
The getDocComment() method from the Reflection API (in this case, the
ReflectionClass class) returns no result where an if block exists
before the documentation comment.
Reproduce code:
---------------
if (!class_exists('AnotherObject'))
{
require("anotherobject.php");
}
/**
* Comment to test getDocComment()
*/
class TestObject
{
}
$rclass = new ReflectionClass('TestObject');
echo "Comment: '".$rclass->getDocComment()."'";
Expected result:
----------------
Comment: '/** * Comment to test getDocComment() */'
Actual result:
--------------
Comment: ''
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34243&edit=1