Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58789 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57385 invoked from network); 8 Mar 2012 16:30:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Mar 2012 16:30:14 -0000 Authentication-Results: pb1.pair.com smtp.mail=ralph@ralphschindler.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ralph@ralphschindler.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain ralphschindler.com from 209.85.213.170 cause and error) X-PHP-List-Original-Sender: ralph@ralphschindler.com X-Host-Fingerprint: 209.85.213.170 mail-yx0-f170.google.com Received: from [209.85.213.170] ([209.85.213.170:49818] helo=mail-yx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 37/C9-00152-59ED85F4 for ; Thu, 08 Mar 2012 11:30:14 -0500 Received: by yenl5 with SMTP id l5so377601yen.29 for ; Thu, 08 Mar 2012 08:30:11 -0800 (PST) Received: by 10.236.195.38 with SMTP id o26mr11738093yhn.100.1331224211264; Thu, 08 Mar 2012 08:30:11 -0800 (PST) Received: from ralph-mac.local (ip174-73-14-247.no.no.cox.net. [174.73.14.247]) by mx.google.com with ESMTPS id n24sm5939730yhj.13.2012.03.08.08.30.09 (version=SSLv3 cipher=OTHER); Thu, 08 Mar 2012 08:30:10 -0800 (PST) Message-ID: <4F58DE91.5080606@ralphschindler.com> Date: Thu, 08 Mar 2012 10:30:09 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmFB91YlB6djofejhJZqQOPi8H6k0EtDY7rQPKpnLlWhvYZfjkyCQUWmD/3t9QSww4t2hOF Subject: Re: [PHP-DEV] [RFC] Specify namespace to include file into. From: ralph@ralphschindler.com (Ralph Schindler) At first glance, this is technically impossible, with regards to our current resolution rules: http://php.net/manual/en/language.namespaces.rules.php Assuming you have an un-namespaced: class Db { public function __construct() { $this->conn = new PDO(..); } } and you require this as: require ./path/to/Db.php, 'Some\SubDb'; How does PDO get resolved? Automatically as \PDO or as \Some\SubDb\PDO? Isn't it just easier to change the code? ;) -ralph On 3/8/12 10:05 AM, Michael Morris wrote: > https://wiki.php.net/rfc/changes_to_include_and_require > > Since the reaction to the first of the two suggestions was largely > negative I've withdrawn it for now to focus on the second of the two > changes. In all honestly, these two suggestions should have had > independent RFC's from the start. > > Of the two suggestions this one has the more profound implications to > the language even if it is simpler to implement. Thoughts? >