Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53343 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62915 invoked from network); 16 Jun 2011 18:30:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jun 2011 18:30:24 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 unknown Received: from [217.114.211.66] ([217.114.211.66:49113] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D7/B2-47775-4BB4AFD4 for ; Thu, 16 Jun 2011 14:30:13 -0400 Received: from [192.168.2.230] (ppp-93-104-106-172.dynamic.mnet-online.de [93.104.106.172]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id 873AB727E8; Thu, 16 Jun 2011 20:30:09 +0200 (CEST) To: Ferenc Kovacs Cc: RQuadling@gmail.com, Stas Malyshev , PHP internals In-Reply-To: References: <4DF8DC94.5060009@sugarcrm.com> <4DFA31EF.1050900@sugarcrm.com> Content-Type: text/plain; charset="UTF-8" Date: Thu, 16 Jun 2011 20:30:08 +0200 Message-ID: <1308249008.2406.230.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Getting a list of registered namespaces. From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Thu, 2011-06-16 at 19:54 +0200, Ferenc Kovacs wrote: > Okay, so namespaces doesn't exists for the engine, because they are added to > the classnames in compile-time, but we could add some --rX argument for the > php binary, which would iterate over the classes and functions and so for a > given extension, and fetch and list the introduced namespaces. > what do you think? The --rX things are reflection shortcuts, while we have one exception (--ri) I actually don't want to pollute the options list. I don't see the need for this. I don't really know when I need to know this information. What is the worth? For the one time this is needed one can use a trivial (g)awk command or such .. $ php --re http | awk '/Class \[.+ class .+\\/ { print gensub(/(.*)\\[^\\]+/, "\\1", 1, $5); }' should be simple to extend for functions, too. For some maybe more readable as PHP script. But I still don't get when I'd need that information. johannes