Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44555 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84872 invoked from network); 30 Jun 2009 17:45:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jun 2009 17:45:29 -0000 Authentication-Results: pb1.pair.com header.from=mike503@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=mike503@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.92.24 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: mike503@gmail.com X-Host-Fingerprint: 74.125.92.24 qw-out-2122.google.com Received: from [74.125.92.24] ([74.125.92.24:54858] helo=qw-out-2122.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 32/7B-52911-63F4A4A4 for ; Tue, 30 Jun 2009 13:45:27 -0400 Received: by qw-out-2122.google.com with SMTP id 5so136708qwi.59 for ; Tue, 30 Jun 2009 10:45:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=bh09Pg2jb4AqQqeeYP19CBQG6LywqJTVoo/lmsQOl0o=; b=x2XLsz0mHpP4yzbKS9rUT+Chf04BLAePV2sd3LjfnjCZNJhdaDP/oY3AldygBt6j99 veDjwrFaqQaUHJfdu6GRkrjczzU76Ckkr0Kk1Msftpp3yLMYhdgjN/VJMB5kQZYTPywA b4Yhbe9NBXx5e6gfcnY//b6hgJB/u9RmtQHtk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=g2uBOSKMlg7MJFYEcYA1BkmKUslXpULB9BBKXMXonCFKTUPr8ZCZ8dRevyt95hQ6d/ 04UfuxRwjFk728h8T774W15CQ6IXIPeO953/NSmtOcTILAvmkhO83mRE+ztJSjTmg1l8 C/I0yTA+4LGyTedvSxRCzlxTfXmBtq53fxYFI= MIME-Version: 1.0 Received: by 10.220.92.212 with SMTP id s20mr6823200vcm.91.1246383904566; Tue, 30 Jun 2009 10:45:04 -0700 (PDT) Date: Tue, 30 Jun 2009 10:45:04 -0700 Message-ID: To: PHP Development Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Request for a function or constant to expose which namespace the current code is running under. From: mike503@gmail.com (Michael Shadle) 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...