PHP Commenting - Forgot some stuff! [closed]
maybe this is a very simple question, but forgot the answer about it because I had it once XD
So the question is about php comments, when commenting functions you use @param to explain what? Can you please clear me up?
You document what types of arguments the function takes and their names. It's used by automatic documentation generators.
See http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_tags.param.pkg.html.
@param
is used when documenting your code. It is so that automated documentation generators know what to output. You specify function parameter names and types, as well as a description.
Like this:
@param datatype $paramname description
All you need to know can be found here: http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_tags.param.pkg.html
精彩评论