note 99938 added to reflectionclass.getdoccomment
| From: | uramihsayibok at osu1 dot php dot net | Date: | Thu, 16 Sep 2010 04:50:56 +0000 |
| Subject: | note 99938 added to reflectionclass.getdoccomment | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-172622@lists.php.net to get a copy of this message | ||
According to what I can find in the PHP (5.3.2) source code, getDocComment will return the doc
comment as the parser found it.
The doc comment (T_DOC_COMMENT) must begin with a /** - that's two asterisks, not one. The
comment continues until the first */. A normal multi-line comment /*...*/ (T_COMMENT) does not count
as a doc comment.
The doc comment itself includes those five characters, so <?php substr($doccomment, 3, -2) ?>
will get you what's inside. A call to trim() after is recommended.
----
Server IP: 192.41.42.26
Probable Submitter: 75.172.108.185
----
Manual Page -- http://www.php.net/manual/en/reflectionclass.getdoccomment.php
Edit -- https://master.php.net/note/edit/99938
Del: integrated -- https://master.php.net/note/delete/99938/integrated
Del: useless -- https://master.php.net/note/delete/99938/useless
Del: bad code -- https://master.php.net/note/delete/99938/bad+code
Del: spam -- https://master.php.net/note/delete/99938/spam
Del: non-english -- https://master.php.net/note/delete/99938/non-english
Del: in docs -- https://master.php.net/note/delete/99938/in+docs
Del: other reasons-- https://master.php.net/note/delete/99938
Reject -- https://master.php.net/note/reject/99938
Search -- https://master.php.net/manage/user-notes.php