What does @param mean in a class?

前端 未结 5 1903
情歌与酒
情歌与酒 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:08

    PHP is entirely oblivious to comments. It is used to describe the parameters the method takes only for making the code more readable and understandable.

    Additionally, good code practice dedicates to use certain names (such as @param), for documentation generators.

    Some IDEs will include the @param and other information in the tooltip when using a hovering over the relevant method.

提交回复
热议问题