That's not the problem, the problem is when you extend a class with a
(defined) interface, you can't use the class before it is defined (the
class, not the interface). See the examples on the linked question.


On Fri, Apr 5, 2013 at 1:48 PM, Joe Watkins <krak...@php.net> wrote:
> On 04/05/2013 11:39 AM, Madara Uchiha wrote:
>>
>> After I saw this question on Stack Overflow:
>>
>> http://stackoverflow.com/questions/15688642/how-does-a-class-extension-or-interface-work,
>> I realized that the guy was right.
>>
>> Is there an explanation for this, or is it just one of those things
>> that got overlooked?
>>
>> Should something be done? (i.e. enforcing class usage only after
>> definition?)
>>
> Interfaces must be declared before being referenced.
>
> Joe

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to