Php 如何为可变函数(即参数数量未定义的函数)编写一个Doxygen注释?

Php 如何为可变函数(即参数数量未定义的函数)编写一个Doxygen注释?,php,function,comments,doxygen,variadic,Php,Function,Comments,Doxygen,Variadic,我正在尝试为一个参数数量不限的函数编写一个doxygen块注释,但是我找不到合适的标记。提供的参数都应该是字符串,它们将在函数中连接起来以形成一个新字符串 doxygen标签的正确用法是什么?我经常看到的一种模式(doxygen理解的格式)是: 是的,字面上是…作为变量名 实际上,phpDocumentor上的语法是$paramname,… /** * Builds a file path with the appropriate directory separator. * @param

我正在尝试为一个参数数量不限的函数编写一个doxygen块注释,但是我找不到合适的标记。提供的参数都应该是字符串,它们将在函数中连接起来以形成一个新字符串


doxygen标签的正确用法是什么?

我经常看到的一种模式(doxygen理解的格式)是:


是的,字面上是
作为变量名

实际上,phpDocumentor上的语法是
$paramname,…

/**
 * Builds a file path with the appropriate directory separator.
 * @param string $segments,... unlimited number of path segments
 * @return string Path
 */
function file_build_path(...$segments) {
    return join(DIRECTORY_SEPARATOR, $segments);
}

就写吧。文档只是,它不应该是可执行的或正式的,imhot PHP5.6中有一个新特性,这将使这种方式更容易。
的语法不正确!正确的语法是
$paramname,…
@Fred,在我三年前写这篇文章的时候,它是正确的。如果有一个权威链接来支持你的答案,那就太好了!你说得对,本杰明
/**
 * Builds a file path with the appropriate directory separator.
 * @param string $segments,... unlimited number of path segments
 * @return string Path
 */
function file_build_path(...$segments) {
    return join(DIRECTORY_SEPARATOR, $segments);
}