采用:
foreach ($objs as $obj) { // Typehinting will occur after typing $obj->}
class A { private $items;}
用于类属性。
上一个09年的答案,当时PHPDoc(以及诸如Zend Studio和Netbeans之类的IDE)没有该选项:
你能做的最好的就是
foreach ($Objs as $Obj){ // You should be able to get hinting after the preceding line if you type $Obj->}
我在Zend Studio中做了很多。不了解其他编辑器,但它应该起作用。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)