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
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.