note 127126 added to reflectionproperty.getdoccomment
| From: | Jim at main dot php dot net | Date: | Mon, 23 May 2022 02:51:08 +0000 |
| Subject: | note 127126 added to reflectionproperty.getdoccomment | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-218518@lists.php.net to get a copy of this message | ||
Unfortunately, inherited doc comments are not supported.
<?php
class A {
/**
* @var string
*/
public string $prop = 'A';
}
class B extends A {
public string $prop = 'B';
}
$prop = new ReflectionProperty('B', 'prop');
var_dump($prop->getDocComment());
?>
results in FALSE
----
Server IP: 45.112.84.4
Probable Submitter: 185.85.3.47 (proxied: 78.27.148.6)
----
Manual Page -- https://php.net/manual/en/reflectionproperty.getdoccomment.php
Edit -- https://main.php.net/note/edit/127126
Del: integrated -- https://main.php.net/note/delete/127126/integrated
Del: useless -- https://main.php.net/note/delete/127126/useless
Del: bad code -- https://main.php.net/note/delete/127126/bad+code
Del: spam -- https://main.php.net/note/delete/127126/spam
Del: non-english -- https://main.php.net/note/delete/127126/non-english
Del: in docs -- https://main.php.net/note/delete/127126/in+docs
Del: other reasons-- https://main.php.net/note/delete/127126
Reject -- https://main.php.net/note/reject/127126
Search -- https://main.php.net/manage/user-notes.php