PHP文档是否有标准样式?
我是PHP开发新手,我想知道社区是否有使用注释的代码内联文档的指导方针。我喜欢Python之类的东西,但我喜欢流行的文档提取工具使用的格式,甚至是流行产品的文档标准。使用(非常类似于javadoc)PHP最广泛使用的API文档形式是a.k.a.phpdoc。相当多的IDE还能够使用phpDocumentor样式的API文档提取信息以改进自动完成提示。首先想到的是PHPdoc,看看它(PHP扩展和应用程序存储库)包含了一个using phpDocumentor以及一些其他有用的约定。PHPdoc(phpDocumentor)样式很常见。它使用PHP文档是否有标准样式?,php,documentation,Php,Documentation,我是PHP开发新手,我想知道社区是否有使用注释的代码内联文档的指导方针。我喜欢Python之类的东西,但我喜欢流行的文档提取工具使用的格式,甚至是流行产品的文档标准。使用(非常类似于javadoc)PHP最广泛使用的API文档形式是a.k.a.phpdoc。相当多的IDE还能够使用phpDocumentor样式的API文档提取信息以改进自动完成提示。首先想到的是PHPdoc,看看它(PHP扩展和应用程序存储库)包含了一个using phpDocumentor以及一些其他有用的约定。PHPdoc(
<?php
/**
* This is a DocBlock for a function.
*/
function associatedFunction()
{
}
<?php
/**
* I belong to a file
*/
/**
* I belong to a class
*/
class Def
{
}
<?php
/**
* A summary informing the user what the associated element does.
*
* A *description*, that can span multiple lines, to go _in-depth_ into the details of this element
* and to provide some background information or textual references.
*
* @param string $myArgument With a *description* of this argument, these may also
* span multiple lines.
*
* @return void
*/
function myFunction($myArgument)
{
}