开发者

PHP - @param in comment

开发者 https://www.devze.com 2023-03-30 07:17 出处:网络
In php, why do people sometimes have things like param mixed $value as comment in their code (usually found in Object-Ori开发者_如何学Goented PHP)? When should you write that yourself and how exactl

In php, why do people sometimes have things like

param mixed $value

as comment in their code (usually found in Object-Ori开发者_如何学Goented PHP)? When should you write that yourself and how exactly should you use it?

Thanks!


It's used by IDEs to auto-generate tooltips and documentation, usually based on Javadoc.


It is written to be used with documentation generation tools and with IDEs autocompletion.


mixed means it can accept several data types of the param.


It's a standardized way of formatting comments. You can read more about it here: http://www.phpdoc.org/about

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号