views:

27

answers:

2

In php we use includes. So variables defined in one file and then their scope spans included files too. Zend studio has no idea how to get the type of the variable I am using inside an included file, this is very annoying when the variable type is a big class.
Is there a way to hint the ide about variable types? in included files?

+1  A: 

I have an article on some code completion tips Zend Studio and PDT Code Completion Tips that might help. However, it is a good idea to try and limit the variables that required from other files. It can quite easily make for difficult to maintain code.

Kevin Schroeder
A: 
foreach($A as $AnInstance)
/*@var MyClass $AnInstance*/
$AnInstance->doSomething();
Itay Moav