ReflectionFunctionAbstract::getDocComment

(PHP 5 >= 5.1.0, PHP 7, PHP 8)

ReflectionFunctionAbstract::getDocComment β€” ΠŸΠΎΠ»ΡƒΡ‡Π°Π΅Ρ‚ doc-ΠΊΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠΉ

ОписаниС

public function ReflectionFunctionAbstract::getDocComment(): string|false

ΠŸΠΎΠ»ΡƒΡ‡Π°Π΅Ρ‚ doc-ΠΊΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠΉ ΠΈΠ· описания Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΈ.

Бписок ΠΏΠ°Ρ€Π°ΠΌΠ΅Ρ‚Ρ€ΠΎΠ²

Π‘ΠΈΠ³Π½Π°Ρ‚ΡƒΡ€Π° Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΈ Π½Π΅ содСрТит ΠΏΠ°Ρ€Π°ΠΌΠ΅Ρ‚Ρ€ΠΎΠ².

Π’ΠΎΠ·Π²Ρ€Π°Ρ‰Π°Π΅ΠΌΡ‹Π΅ значСния

ΠšΠΎΠΌΠΌΠ΅Π½Ρ‚Π°Ρ€ΠΈΠΉ, Ссли ΠΎΠ½ Π΅ΡΡ‚ΡŒ, false Π² ΠΏΡ€ΠΎΡ‚ΠΈΠ²Π½ΠΎΠΌ случаС.

Π‘ΠΌΠΎΡ‚Ρ€ΠΈΡ‚Π΅ Ρ‚Π°ΠΊΠΆΠ΅

οΌ‹Π”ΠΎΠ±Π°Π²ΠΈΡ‚ΡŒ

ΠŸΡ€ΠΈΠΌΠ΅Ρ‡Π°Π½ΠΈΡ ΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»Π΅ΠΉ 2 notes

up
8
jens dot kohl+php at gmail dot com ΒΆ
14 years ago
Beware when you try to use the getDocComment() methods with eAccelerator turned on. eAccelerator Β»optimizesΒ« your code in a way that it removes any comments from your source. So at runtime you're not able to get any comments and therefor getDocComments return false.
up
4
bruno at vault7 dot com ΒΆ
16 years ago
In order to retrieve a comment with this method, the comment must be imediately before the class, function or method, start with /** and end with */