Re: IDE for PHP



Gary L. Burnore wrote:
On 17 Jun 2006 17:58:20 -0700, "Chung Leong"
<chernyshevsky@xxxxxxxxxxx> wrote:

Gary L. Burnore wrote:
2. If you've defined a class and some methods, when you instantiate
that class, it knows the type of the object, so when you do a

MyClass $obj = new MyClass('arg');
$obj->

it shows the pop-up again with the members and the public interface of
the class MyClass.
Again yes, both do.
Hmmm...how could that be done in PHP, where variables are typeless?

It can only know by the name of the class. It ain't perfect by any
means. It can be "fooled". You still have to know what you're doing.

I *think* he may have been referring to this line of yours:

MyClass $obj = new MyClass('arg');

Since PHP is loosely typed, the "MyClass" preceding $obj is bad syntax.

And, if that's not the case, then @Chung Leong: The IDE keeps track of which class you assign to the variable. Zend Studio is even capable of doing this for assignments from a function call:
.



Relevant Pages