#34243 [Opn->Asn]: ReflectionClass::getDocComment() returns no result

From: Date: Thu, 25 Aug 2005 13:20:32 +0000
Subject: #34243 [Opn->Asn]: ReflectionClass::getDocComment() returns no result
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-83980@lists.php.net to get a copy of this message
ID: 34243 Updated by: sniper@php.net Reported By: colin at encode dot net dot au -Status: Open +Status: Assigned Bug Type: Scripting Engine problem Operating System: * PHP Version: 5.1.0RC1 -Assigned To: +Assigned To: helly New Comment: Assigned to the maintainer. Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#83980) next »