Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:36818 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20025 invoked from network); 6 Apr 2008 12:49:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Apr 2008 12:49:15 -0000 Authentication-Results: pb1.pair.com header.from=greg@chiaraquartet.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=greg@chiaraquartet.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain chiaraquartet.net from 38.99.98.18 cause and error) X-PHP-List-Original-Sender: greg@chiaraquartet.net X-Host-Fingerprint: 38.99.98.18 beast.bluga.net Linux 2.6 Received: from [38.99.98.18] ([38.99.98.18:48391] helo=mail.bluga.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 50/C6-03421-AC6C8F74 for ; Sun, 06 Apr 2008 08:49:15 -0400 Received: from mail.bluga.net (localhost.localdomain [127.0.0.1]) by mail.bluga.net (Postfix) with ESMTP id CA08EC0FD85; Sun, 6 Apr 2008 05:49:12 -0700 (MST) Received: from [212.181.245.103] (host-n18-103.homerun.telia.com [212.181.245.103]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bluga.net (Postfix) with ESMTP id 085F6C0FD84; Sun, 6 Apr 2008 05:49:11 -0700 (MST) Message-ID: <47F8C6C2.3080001@chiaraquartet.net> Date: Sun, 06 Apr 2008 07:49:06 -0500 User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Julian Reich CC: internals@lists.php.net References: <5D0C3386-C2BC-4086-87BB-806E2350B373@eenterphace.org> In-Reply-To: <5D0C3386-C2BC-4086-87BB-806E2350B373@eenterphace.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: Re: namespace implementation (irritating warning and autoload) From: greg@chiaraquartet.net (Greg Beaver) Julian Reich wrote: > Hi, > > I recently started porting an application to PHP 5.3. > > 1. While testing the new namespace implementation I noticed the following: > > namespace Test1; > function fooBar() { echo 'Test1::fooBar()' . PHP_EOL; } > > namespace Test2; > use Test1; > Test1::fooBar(); > > Executing the code above results in a warning: "The use statement with > non-compound name 'Test1' has no effect in [...]". > I understand the rationale behind this warning but it simply isn't true: > omitting the use statement results in a fatal error: "Class > 'Test2::Test1' not found in [...]". > > Since the following code executes without warning or error I think the > code above (without use statement) should also execute just fine. > > namespace Test1::Test2; > function fooBar() { echo 'Test1::Test2::fooBar()' . PHP_EOL; } > > namespace Test3; > Test1::Test2::fooBar(); This is a clear bug, please report it at bugs.php.net Greg