采用:
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中做了很多。不了解其他编辑器,但它应该起作用。



