What does @param mean in a class?

前端 未结 5 1899
情歌与酒
情歌与酒 2020-12-29 03:46

What does the @param mean when creating a class? As far as I understand it is used to tell the script what kind of datatype the variables are and what kind of value a functi

5条回答
  •  执笔经年
    2020-12-29 04:16

    @param doesn't have special meaning in PHP, it's typically used within a comment to write up documentation. The example you've provided shows just that.

    If you use a documentation tool, it will scour the code for @param, @summary, and other similar values (depending on the sophistication of the tool) to automatically generate well formatted documentation for the code.

提交回复
热议问题