0
在PHP中很常见输入注释这样的变量:关于函数的返回类型PHP类型注释的功能?
/**
* @var boolean
*/
protected $isLoaded;
可是什么? PHP Type Annotation是否支持函数的返回类型?
如果是这样,我怎么能注释功能的类图中的返回类型
-getName():字符串
?
我希望是这样的:
/**
* @return String
*/
private function getName() {}
但它忽略。
http://php.net/manual/en/functions.returning-values.php#functions.returning-values.type-declaration – Deadooshka
谢谢,我在找错地方:http:// php- annotations.readthedocs.io/en/latest/AnnotationLibrary.html?highlight=return 并找不到答案。 – StandardNerd