PHPDoc的@param注释的有效值是什么?(What are valid values for PHPDoc's @param annotation?)

编程入门 行业动态 更新时间:2024-10-24 19:19:50
PHPDoc的@param注释的有效值是什么?(What are valid values for PHPDoc's @param annotation?)

我正在使用PHPdocs阅读本文 :

数据类型应该是有效的PHP类型(int,string,bool等),“这很好,但是它们没有说明用于识别其他类型的字符串(例如int,string,bool)。

我在GUESSING他们使用(强制转换)语法来确定用于注释的类型,但像PHP中的浮点这样的东西没有一个强制转换操作符,所以我不知道该用什么。 也许它是漂浮的,或者也许它是fp。

有没有人有PHP的基本类型的确定列表,以及在PHPdocs中应该用什么字符串来识别它们?

I'm on PHPdocs Reading this :

The datatype should be a valid PHP type (int, string, bool, etc)," which is fine, but they don't say which strings (such as int, string, bool) to use to identify the other types.

I'm GUESSING they use the (cast) syntax to determine the type to be used for the annotations, but something like floating point in PHP doesn't have a cast operator for it so I'm not sure what to use for that. Maybe it's float, or maybe it's fp.

Does anyone have a definitive list of the basic types in PHP and what string should be used to identify them in your PHPdocs?

最满意答案

它全部列在文档中: http : //phpdoc.org/docs/latest/references/phpdoc/types.html

对于浮点数,关键字是(逻辑上) float 。

It's all listed in the documentation: http://phpdoc.org/docs/latest/references/phpdoc/types.html

For floats, the keyword is (logically enough) float.

更多推荐

本文发布于:2023-08-06 23:59:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1457638.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:有效值   注释   param   PHPDoc   values

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!