PHP Specify the Return Type Hints for a Method

后端 未结 5 1078
庸人自扰
庸人自扰 2021-01-07 23:18

What is the correct syntax for me to specify the return type hints for a method?

For example, I have such a method:

private static function Construct         


        
5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-07 23:54

    Return type hints are only supplied by your IDE. Zend studio and PDT support the PHPDocumentor style doc blocks.

    http://manual.phpdoc.org/HTMLSmartyConverter/PHP/phpDocumentor/tutorial_tags.return.pkg.html

提交回复
热议问题