Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43421 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83928 invoked from network); 20 Mar 2009 01:45:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Mar 2009 01:45:23 -0000 Received: from [127.0.0.1] ([127.0.0.1:11530]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id 61/37-44693-335F2C94 for ; Thu, 19 Mar 2009 20:45:23 -0500 Authentication-Results: pb1.pair.com header.from=ptarjan@yahoo-inc.com; sender-id=unknown; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=ptarjan@yahoo-inc.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain yahoo-inc.com from 216.145.54.172 cause and error) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: ptarjan@yahoo-inc.com X-Host-Fingerprint: 216.145.54.172 mrout2.yahoo.com FreeBSD 4.7-5.2 (or MacOS X 10.2-10.3) (2) Received: from [216.145.54.172] ([216.145.54.172:32199] helo=mrout2.yahoo.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 09/F6-44693-BC1F2C94 for ; Thu, 19 Mar 2009 20:30:52 -0500 Received: from SNV-EXPF01.ds.corp.yahoo.com (snv-expf01.ds.corp.yahoo.com [207.126.227.250]) by mrout2.yahoo.com (8.13.6/8.13.6/y.out) with ESMTP id n2K1T1wp004355 for ; Thu, 19 Mar 2009 18:29:01 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; s=serpent; d=yahoo-inc.com; c=nofws; q=dns; h=received:user-agent:date:subject:from:to:message-id: thread-topic:thread-index:mime-version:content-type: content-transfer-encoding:return-path:x-originalarrivaltime; b=HSQpBEydNnLeSM492PPcy5K9NDty73r9LZiwtcOQa6RWVxGv3GZ/gcawME4/ZyKR Received: from SNV-EXVS01.ds.corp.yahoo.com ([216.145.51.185]) by SNV-EXPF01.ds.corp.yahoo.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 19 Mar 2009 18:29:01 -0700 Received: from 10.74.40.19 ([10.74.40.19]) by SNV-EXVS01.ds.corp.yahoo.com ([216.145.51.166]) with Microsoft Exchange Server HTTP-DAV ; Fri, 20 Mar 2009 01:28:41 +0000 User-Agent: Microsoft-Entourage/12.14.0.081024 Date: Thu, 19 Mar 2009 21:28:39 -0400 To: Message-ID: Thread-Topic: Late defined classes Thread-Index: Acmo+zI+vzJy1+AwbEWOaWjWXbbQTQ== Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-OriginalArrivalTime: 20 Mar 2009 01:29:01.0511 (UTC) FILETIME=[3FA9A570:01C9A8FB] Subject: Late defined classes From: ptarjan@yahoo-inc.com (Paul Tarjan) Hi all, This works (albeit with an abstract class error): --- class Result implements Countable { } $result = new Result(); --- Switching their order: --- $result = new Result(); class Result implements Countable { } --- gives : --- Fatal error: Class 'Result' not found in /tmp/not_defined.php on line 2 --- If I remove the interface, everything is peachy: --- $result = new Result(); class Result { } --- So as a user of PHP I was quite surprised that a class with an interface must be in the code flow to be defined. Is there anything (easy) that we can do to support this case? Thanks Paul