类、函数等之前的长描述性代码块的技术名称

Technical name for long descriptive code block before classes, functions, etc

我知道在 PHP 中(像许多其他语言一样)人们在 类、函数和文件之前的每一行前添加带有星号的描述性注释块。他们有正式名称吗?

/**
* 
* Do these types of bullet-ed block comments have any official name?
* 
*/

这来自Java的上下文,称为JavaDoc,您在其中给出了一段详细信息,包括但不限于参数、return值等

如果Java...

A documentation comment is framed by slash-star-star and star-slash (i.e. /** ... */). The documentation is in the HTML format.

HTML 格式随后由 Eclipse 或 Netbeans 或其他类似的 IDE 呈现,作为特定功能的提示。

JavaDoc 只是名称,但它可用于任何语言。

在 Eclipse 中用于提示的 JavaDoc 示例(代码辅助)是:

在 NetBeans 中,当在 PHP 中找不到文档时:

在 NetBeans 中,使用 PHP文档:


(来源:netbeans.org

它在 NetBeans 中以这种方式显示:

他们叫 DocBlocks. For PHP, there's an accepted syntax that was implemented by phpDocumentor

In reality a DocBlock is in fact the name for a combination of a, so-called, DocComment and a block of the PHPDoc Domain Specific Language (DSL). A DocComment is the container that contains documentation that can be formatted according to the PHPDoc Standard.

A DocComment starts with a forward slash and two asterisks (/**), which is similar to how you start a multiline comment but with an additional asterisk, and ends with an asterisk and forward slash (*/). DocComments may be a single line in size but may also span multiple lines, in which case each line must start with an asterisk. It is customary, and recommended, to align the asterisks vertically when spanning multiple lines.