Request for a function or constant to expose which namespace the current code is running under.

From: Date: Tue, 30 Jun 2009 17:45:04 +0000
Subject: Request for a function or constant to expose which namespace the current code is running under.
Groups: php.internals 
Request: Send a blank email to internals+get-44555@lists.php.net to get a copy of this message
Namespaces in PHP are scaring me. I can only imagine some of my developers creating code and using namespaces - and how do you identify which namespace a function, class or chunk of code is under? It looks like you can define namespaces anywhere. If I'm looking for a specific function, and it's in two include files, how do you know which namespace the function is written under? Some sort of manual backtrace? Is there a magic constant like __NAMESPACE__ or a function that can return the name of the namespace the code is currently running under? At the moment I would actually be telling my developers when I switch over to 5.3.0 to NOT use namespacing. We don't need it in any of our applications, and it will just complicate things...

« previous php.internals (#44555) next »