|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-02-08 01:39 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 23:00:01 2025 UTC |
Description: ------------ When using ReflectionProperty::getDocComment() to get the comments for a property in an extended class, it returns the comments for the base class, not the extended one. Reproduce code: --------------- <?php class Base { /** Base comment block */ public $foo = 'bar'; } class Extended extends Base { /** Extended commentary */ public $foo = 'zim'; } $reflect = new ReflectionClass('Extended'); $props = $reflect->getProperties(); $docs = $props[0]->getDocComment(); print $docs; // should output "Extended commentary" // but is in fact "Base comment block" ?> Expected result: ---------------- /** Extended commentary */ Actual result: -------------- /** Base comment block */