Re: RE : [PHP-DEV] RE : Namespaces and __autoload()
| From: | Marcus Boerger | Date: | Wed, 12 Sep 2007 13:48:27 +0000 |
| Subject: | Re: RE : [PHP-DEV] RE : Namespaces and __autoload() | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-32290@lists.php.net to get a copy of this message | ||
Hello LAUPRETRE,
Wednesday, September 12, 2007, 3:32:13 PM, you wrote:
>> From: Pawel Stradomski [mailto:pstradomski@gmail.com]
>>
>> B), but what with following language construct:
>>
>> function doSomething (Service s) {...}
>>
>> PHP tries to autoload type Service, but it can't know if it's
>> looking for interface or class. Both are possible.
> Correct. I didn't consider this case because I didn't know this syntax for
> interfaces.
In general it is not a question of syntax. Interfaces are purely a special
case of classes and cannot be treated differently outside of some engine
stuff. And even there the difference is only a flag, interface or not.
Best regards,
Marcus