Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53341 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56012 invoked from network); 16 Jun 2011 17:54:16 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Jun 2011 17:54:16 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.213.42 mail-yw0-f42.google.com Received: from [209.85.213.42] ([209.85.213.42:43325] helo=mail-yw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1E/71-47775-7434AFD4 for ; Thu, 16 Jun 2011 13:54:16 -0400 Received: by ywp17 with SMTP id 17so1107428ywp.29 for ; Thu, 16 Jun 2011 10:54:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=DAhQ7XqHf/deci6autVwr9RYu4hIY2zv1PzNIuY0X9I=; b=lVmyRzkgVgBH4/GBRpcLfOPFH5Iip6ajc3qChonPz8dnMgkBI6R5XDoz+jiFqcBHdD 34j43i5w1dXtXXwDrdSLXgeF2n0Uo+iH1P/XrfXfMBnEhRQRRT4wAAcRWeYZ0RxuAH6f gL4Rf2fieU780GBR/phKoQQAmh6bdK3mYLSKc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=JtKhYpD/oB6IEiwzHOm8DtW3nu/5rU/iSwXObcBV9PmdBvHjSsmBKb5xIgz4Ici72O tVQGwEAGDQJycpVwo6RrTsjFRo5dcuEvTzsnKnVIYkhIBDzJzNJwvIKiQXv21cCS8VrI yzDvCsjYxIZenFi2z5YZXZmldEWoxBzfq+seo= MIME-Version: 1.0 Received: by 10.150.160.19 with SMTP id i19mr1310870ybe.338.1308246852780; Thu, 16 Jun 2011 10:54:12 -0700 (PDT) Received: by 10.147.99.11 with HTTP; Thu, 16 Jun 2011 10:54:12 -0700 (PDT) In-Reply-To: References: <4DF8DC94.5060009@sugarcrm.com> <4DFA31EF.1050900@sugarcrm.com> Date: Thu, 16 Jun 2011 19:54:12 +0200 Message-ID: To: RQuadling@gmail.com Cc: Stas Malyshev , PHP internals Content-Type: multipart/alternative; boundary=000e0cd733f8f043f604a5d7f41a Subject: Re: [PHP-DEV] Getting a list of registered namespaces. From: tyra3l@gmail.com (Ferenc Kovacs) --000e0cd733f8f043f604a5d7f41a Content-Type: text/plain; charset=UTF-8 On Thu, Jun 16, 2011 at 7:48 PM, Richard Quadling wrote: > On 16 June 2011 17:40, Stas Malyshev wrote: > > Hi! > > > > On 6/16/11 8:37 AM, Richard Quadling wrote: > >> > >> Maybe, but because of a lack of convention on naming, we have > namespaces. > > > > No, we have namespaces not because we couldn't agree on naming > convention, > > but because any naming convention without namespaces would lead to ugly > code > > (which you call "sensible long names" but which rapidly stop being > sensible > > if you actually try to do it). > > I was joking. > > > > >> So it would seem appropriate to have the ability to investigate a > >> namespace to see what it contains and/or if it exists. > >> > >> Why? For exactly the same reasons you have class_exists(), > >> interface_exists(), function_exists(). > > > > Classes and functions actually exist as objects in the engine. Namespaces > do > > not. They are just parts of names. You can not instantiate a namespace, > you > > can not call a namespace. So these reasons do not apply. > > > And now I understand. Thanks for that. > > 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? Tyrael --000e0cd733f8f043f604a5d7f41a--