php – 如何记录可变数量的参数
发布时间:2020-05-25 09:05:07 所属栏目:PHP 来源:互联网
导读:如何记录可变数量的参数?我正在用 PHP和 JavaScript编写应用程序.目前我有(在JavaScript中): /** * Description * @param {String} description */function fn(){ // arguments holds all strings.} 那么,我该如何编写n个字符串参数? 例如. PhpDocumentor
|
如何记录可变数量的参数?我正在用 PHP和 JavaScript编写应用程序.目前我有(在JavaScript中): /**
* Description
* @param {String} description
*/
function fn()
{
// arguments holds all strings.
}
那么,我该如何编写n个字符串参数? 例如. PhpDocumentor建议使用省略号/**
* Example of unlimited parameters.
* Returns a formatted var_dump for debugging purposes
* (since the recurrences of $v are not listed in the actual function signature in the code,* you may wish to highlight they are "optional" in their description)
* @param string $s string to display
* @param mixed $v variable to display with var_dump()
* @param mixed $v,... unlimited OPTIONAL number of additional variables to display with var_dump()
*/
function fancy_debug($s,$v)
{ (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
