Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33876 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71168 invoked by uid 1010); 8 Dec 2007 22:09:33 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 71153 invoked from network); 8 Dec 2007 22:09:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Dec 2007 22:09:33 -0000 Authentication-Results: pb1.pair.com header.from=scott.mcnaught@synergy8.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=scott.mcnaught@synergy8.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain synergy8.com designates 202.174.102.11 as permitted sender) X-PHP-List-Original-Sender: scott.mcnaught@synergy8.com X-Host-Fingerprint: 202.174.102.11 au01.synergy8.com Linux 2.6 Received: from [202.174.102.11] ([202.174.102.11:44645] helo=au01.synergy8.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9C/21-58559-A161B574 for ; Sat, 08 Dec 2007 17:09:31 -0500 Received: from [124.171.228.105] (helo=scottnote) by au01.synergy8.com with esmtpa (Exim 4.68) (envelope-from ) id 1J17rR-000707-Ne for internals@lists.php.net; Sun, 09 Dec 2007 08:09:26 +1000 Reply-To: To: References: <475713B2.4030802@iamjochem.com> <475719ED.8050306@zend.com> <200712052110.37023.larry@garfieldtech.com> <47576AEF.4030306@omegavortex.net> <5474E017-DF97-4B91-8FE0-7D6831E64F56@bitxtender.com> <4EE0727E-ABBA-490D-B247-8C6E9A9727BA@gmx.net> <345fd5cd0712070815k55eac42fh14d5685039c03113@mail.gmail.com> <345fd5cd0712070816m2c0d4a22hd03f91abff2405ae@mail.gmail.com> <10845a340712081212v7cbd1b6am4020eb3f49544f14@mail.gmail.com> <1197149004.9893.2.camel@sams-room> In-Reply-To: <1197149004.9893.2.camel@sams-room> Date: Sun, 9 Dec 2007 08:09:26 +1000 Message-ID: <000601c839e6$ff6f6190$fe4e24b0$@mcnaught@synergy8.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acg54Jxuj9XAQd3+QVGVFyht+vJnJAABTwWw Content-Language: en-au X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - au01.synergy8.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - synergy8.com Subject: RE: [PHP-DEV] Namespace From: scott.mcnaught@synergy8.com Quick question... If I wanted to override or extend php's functions... Could this work? Say I want to change the implementation of var_dump() to make it more html friendly... function var_dump($mixedVariable) { echo('
');
	::var_dump($mixedVariable);
	echo('
'); } SCOTT MCNAUGHT Software Developer Synergy 8 / +617 3397 5212 scott.mcnaught@synergy8.com -----Original Message----- From: Sam Barrow [mailto:sam@sambarrow.com] Sent: Sunday, 9 December 2007 7:23 AM To: RQuadling@GoogleMail.com Cc: Lokrain; internals@lists.php.net Subject: Re: [PHP-DEV] Namespace Once you say "namespace xyz ;" everything in the file is now relative to namespace xyz. To refer to the global namespace, you use the following On Sat, 2007-12-08 at 20:12 +0000, Richard Quadling wrote: > On 07/12/2007, Lokrain wrote: > > Hello all, > > > > I just wanted to drop an opp. Just to see the logic, when we have > > programming structure class, interface, function, if statement, switch > > statement etc, we have bracers encapsulation. This is the logic that most > > programming language give to show a programmer that something is inside > > something. We here have namespace with the same idea, and no bracers. > > > > Conclusion: namespaces are not logical => no thanks > > > > PS. By the way, I do not think that any workarounds on that logic will not > > be nice. > > > > I'm trying to understand the argument against using braces. > > And that has led me to the following question. > > Assuming no braces, how would I put code OUTSIDE of the namespace in a > single file. > > namespace XYZ; > > xyz related code goes here > > non xyz related code goes here but how do I let PHP know it isn't part of xyz? > > > > Do I have to change namespace by using a dummy namespace? Same issue > how do I refer to the global namespace. > > > Richard. > > -- > ----- > Richard Quadling > Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 > "Standing on the shoulders of some very clever giants!" > -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php