downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  

<Global spaceName resolution rules>
Last updated: Thu, 26 Jun 2008

__NAMESPACE__

The compile-time constant __NAMESPACE__ is defined to the name of the current namespace. Outside namespace this constant has the value of empty string. This constant is useful when one needs to compose full name for local namespaced names.

Example #1 Using __NAMESPACE__

<?php
namespace A
::B::C;
        
function
foo() {
// do stuff
}

set_error_handler(__NAMESPACE__ . "::foo");
?>



add a noteadd a note User Contributed Notes
__NAMESPACE__
There are no user contributed notes for this page.




<Global spaceName resolution rules>
Last updated: Thu, 26 Jun 2008
show source | credits | sitemap | contact | advertising | mirror sites
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://phpbuilder.com/
Last updated: Tue Nov 1 20:20:59 2005 EST
Columns / Articles | Tips / Quickies | News | News Linking and RSS Feeds | Shared Code Library
Mail Archives | Support / Discussion Forums | Get Started! Links | Contribute! | Docs