Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41410 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28047 invoked from network); 27 Oct 2008 02:46:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Oct 2008 02:46:12 -0000 Authentication-Results: pb1.pair.com smtp.mail=greg@chiaraquartet.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=greg@chiaraquartet.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain chiaraquartet.net from 208.83.222.18 cause and error) X-PHP-List-Original-Sender: greg@chiaraquartet.net X-Host-Fingerprint: 208.83.222.18 unknown Linux 2.6 Received: from [208.83.222.18] ([208.83.222.18:36437] helo=mail.bluga.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7A/E4-34199-27B25094 for ; Sun, 26 Oct 2008 21:46:12 -0500 Received: from mail.bluga.net (localhost.localdomain [127.0.0.1]) by mail.bluga.net (Postfix) with ESMTP id 8ABCCC11596; Sun, 26 Oct 2008 19:45:49 -0700 (MST) Received: from Greg-Beavers-monster.local (c-24-63-32-181.hsd1.ma.comcast.net [24.63.32.181]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bluga.net (Postfix) with ESMTP id AE0D6C11595; Sun, 26 Oct 2008 19:45:47 -0700 (MST) Message-ID: <49052B6D.2090502@chiaraquartet.net> Date: Sun, 26 Oct 2008 21:46:05 -0500 User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070807) MIME-Version: 1.0 To: Robert Cummings CC: Andrew Mason , nrixham@gmail.com, internals@lists.php.net, Lukas Kahwe Smith References: <49048EC1.9060908@chiaraquartet.net> <4904F238.8040909@gmail.com> <99cd336d0810261558w4d6388edl63eb94b3422d56b5@mail.gmail.com> <1225075131.4941.28.camel@localhost> In-Reply-To: <1225075131.4941.28.camel@localhost> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: Re: [PHP-DEV] Re: namespace separator and whining From: greg@chiaraquartet.net (Greg Beaver) Robert Cummings wrote: > On Mon, 2008-10-27 at 09:28 +1030, Andrew Mason wrote: >> So can I just confirm that what was previously >> >> > >> $x = new Framework::Utils::Foo(); >> $y = new Project::PEAR::Bar( 'somestring' ); >> >> >> ?> >> >> is now >> >> > >> $x = new Framework\Utils\Foo(); >> $y = new Project\PEAR\Bar( 'somestring' ); >> >> ?> >> >> >> Is this correct ? > > Wouldn't it be: > > > $x = new Framework\Utils::Foo(); > $y = new Project\PEAR::Bar( 'somestring' ); > ?> The correct syntax is: Note that static class elements are accessed using T_DOUBLE_COLON (::), and that the namespace separator \ is used to join namespace and element name. Greg