Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66974 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65443 invoked from network); 5 Apr 2013 11:01:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Apr 2013 11:01:23 -0000 Authentication-Results: pb1.pair.com header.from=dor.tchizik@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dor.tchizik@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.51 as permitted sender) X-PHP-List-Original-Sender: dor.tchizik@gmail.com X-Host-Fingerprint: 209.85.219.51 mail-oa0-f51.google.com Received: from [209.85.219.51] ([209.85.219.51:32839] helo=mail-oa0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 37/41-57919-20FAE515 for ; Fri, 05 Apr 2013 06:01:23 -0500 Received: by mail-oa0-f51.google.com with SMTP id g12so3875830oah.10 for ; Fri, 05 Apr 2013 04:01:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=iAu8dtgnPk+bKjzTOb+ta2q8Ik9WFdG7T8PSmsxw/fs=; b=ooRou56x0WuobC/wosYBAMC5AZCr9LBfuwe/KCBYqjG3KuWE7JAMt5Zckm/KS6mq5H eCuqJKxzdquUbCAeQQjdxlsxTVRoqvzb1B++EQgiJjMJAD6BH5r67MNc6kYpc7lyRFrK P4mewgXvhvLOhqZ6k0MDSKShGg6kP65pruzfShfiu5BkLfb342xzeiny0i7A+SwPAvh3 dw8gR/nykS+B+ypKhNqZ25B12S+jYKOLL3mFm5Trwa0R/YGIXfM6Mf9VNxgKrzzsMxVu rgfmO5SdmD6Cazskh2Ou17LGpvSArPsvGMy/fvwNc6D8f4vsVU0cAkiq9FhsrQbJtnuU M0sg== MIME-Version: 1.0 X-Received: by 10.182.171.99 with SMTP id at3mr2517467obc.25.1365159679726; Fri, 05 Apr 2013 04:01:19 -0700 (PDT) Received: by 10.182.128.69 with HTTP; Fri, 5 Apr 2013 04:01:19 -0700 (PDT) In-Reply-To: <515EABF4.8070401@php.net> References: <515EABF4.8070401@php.net> Date: Fri, 5 Apr 2013 14:01:19 +0300 Message-ID: To: Joe Watkins Cc: PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: Inconsistency in class definition/usage order From: dor.tchizik@gmail.com (Madara Uchiha) 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 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