Re: Inconsistency in class definition/usage order

From: Date: Fri, 05 Apr 2013 11:01:19 +0000
Subject: Re: Inconsistency in class definition/usage order
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-66974@lists.php.net to get a copy of this message
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 <krakjoe@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

« previous php.internals (#66974) next »