Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41412 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30685 invoked from network); 27 Oct 2008 02:56:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Oct 2008 02:56:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=steph@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=steph@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 64.99.136.139 as permitted sender) X-PHP-List-Original-Sender: steph@php.net X-Host-Fingerprint: 64.99.136.139 smtprelay-virgin0139.hostedemail.com Received: from [64.99.136.139] ([64.99.136.139:52083] helo=smtprelay-virgin.hostedemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E4/85-34199-8DD25094 for ; Sun, 26 Oct 2008 21:56:25 -0500 Received: from filter.hostedemail.com (ff-bigip1 [10.5.19.254]) by smtprelay06.hostedemail.com (Postfix) with SMTP id 3FFE4EF271F; Mon, 27 Oct 2008 02:56:22 +0000 (UTC) X-SpamScore: 1 X-Spam-Summary: 2,0,0,aade7959d7c139cd,691ff1dea13fdf9b,steph@php.net,greg@chiaraquartet.net:robert@interjinn.com:slackmase2@gmail.com:nrixham@gmail.com:internals@lists.php.net:mls@pooteeweet.org,RULES_HIT:355:379:539:540:541:542:543:567:599:601:945:960:988:989:1155:1156:1260:1277:1311:1313:1314:1345:1437:1515:1516:1518:1534:1540:1587:1593:1594:1711:1730:1747:1766:1792:2073:2075:2078:2379:2393:2559:2562:2692:2828:2918:3027:3352:3622:3865:3867:3868:3869:3870:3871:3872:3874:3876:3877:5007:6114:6119:6261:7653:7875:8501:8660,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:none,DNSBL:none Received: from foxbox (62-31-252-63.cable.ubr07.shef.blueyonder.co.uk [62.31.252.63]) (Authenticated sender: steph.fox) by omf12.hostedemail.com (Postfix) with ESMTP; Mon, 27 Oct 2008 02:56:20 +0000 (UTC) Message-ID: <013001c937df$d90a5ee0$3ffc1f3e@foxbox> To: "Greg Beaver" , "Robert Cummings" Cc: "Andrew Mason" , , , "Lukas Kahwe Smith" References: <49048EC1.9060908@chiaraquartet.net> <4904F238.8040909@gmail.com> <99cd336d0810261558w4d6388edl63eb94b3422d56b5@mail.gmail.com> <1225075131.4941.28.camel@localhost> <49052B6D.2090502@chiaraquartet.net> Date: Mon, 27 Oct 2008 02:58:08 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-session-marker: 73746570682E666F78 Subject: Re: [PHP-DEV] Re: namespace separator and whining From: steph@php.net ("Steph Fox") Hi lover, (sorry, couldn't resist) > The correct syntax is: > > // initialize class > $a = new Framework\Utils\Foo(); > // namespaced function > Framework\Utils\parse($string); > // static method > Project\PEAR\XML::makeEntity('\\'); > // namespaced constant > if ($a == Framework\Utils\FOO) echo "hi"; > // class constant > if ($a == Project\PEAR\XML::ZOMG) echo "bye"; > ?> > > Note that static class elements are accessed using T_DOUBLE_COLON (::), > and that the namespace separator \ is used to join namespace and element > name. OK... thanks for the clarification. That does actually make perfect sense to me, I just read :: as a method call in Robert's example rather than as a new class. Guess I should sleep before typing 'as I understand it' again :) - Steph