Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41499 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41454 invoked from network); 28 Oct 2008 08:17:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Oct 2008 08:17:09 -0000 Authentication-Results: pb1.pair.com smtp.mail=sv_forums@fmethod.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sv_forums@fmethod.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fmethod.com from 69.16.228.148 cause and error) X-PHP-List-Original-Sender: sv_forums@fmethod.com X-Host-Fingerprint: 69.16.228.148 unknown Linux 2.4/2.6 Received: from [69.16.228.148] ([69.16.228.148:40858] helo=host.fmethod.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3F/22-28585-48AC6094 for ; Tue, 28 Oct 2008 03:17:09 -0500 Received: from [83.228.56.37] (port=4533 helo=pc) by host.fmethod.com with esmtpa (Exim 4.69) (envelope-from ) id 1KujlB-0000WE-9B for internals@lists.php.net; Tue, 28 Oct 2008 03:17:05 -0500 Message-ID: <3E47026EC3F046E59B0B8C9DD5830FF3@pc> To: References: <69907CB6763C4164A1AE82D659B80286@pc> <6fef9b880810271958j6145ae02i125853adefaec9a3@mail.gmail.com> <9b3df6a50810280012udd7946dh798b544cf9fd65ec@mail.gmail.com> Date: Tue, 28 Oct 2008 10:16:59 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.fmethod.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - fmethod.com Subject: Re: [PHP-DEV] Clarifying the resolution rules From: sv_forums@fmethod.com ("Stan Vassilev | FM") > History has shown > us that breaking code (e.g. PHP4 - PHP5) slows adoption of new > versions. Bad example as PHP4 > 5 broke existing code. No existing code has namespaces in it. Anyway: ---------------- A yet another compromise is possible as the lesser evil: Resolution for classes: namespace Foo; new Bar(); 1) Try to find class Foo\Bar. 2) Try to autoload class Foo\Bar. 3) Try to fallback to global *internal or user* class Bar + E_NOTICE; namespace Foo; $result = bar(); 1) Try to find function Foo\bar(). 2) Try to fallback to global *internal or user* function bar(). They key change is: not to make difference between internal and user global functions, just fall back to global ones, so that there's no additional confusion among drop-in replacements, user resources, and internal resources. Send feedback. Thanks. Stan Vassilev