Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:760 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12842 invoked from network); 7 Apr 2003 15:16:59 -0000 Received: from unknown (HELO localhost.localdomain) (65.198.110.5) by pb1.pair.com with SMTP; 7 Apr 2003 15:16:59 -0000 Received: (from andrei@localhost) by localhost.localdomain (8.11.6/8.11.6) id h37FERc12217; Mon, 7 Apr 2003 11:14:27 -0400 X-Authentication-Warning: localhost.localdomain: andrei set sender to andrei@gravitonic.com using -f Date: Mon, 7 Apr 2003 11:14:26 -0400 To: Andi Gutmans Cc: PHP Internals Message-ID: <20030407151425.GE6512@hyperion.gravitonic.com> Mail-Followup-To: Andrei Zmievski , Andi Gutmans , PHP Internals References: <20030404161958.GA1661@hyperion.gravitonic.com> <5.1.0.14.2.20030405154246.032f07a0@127.0.0.1> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5.1.0.14.2.20030405154246.032f07a0@127.0.0.1> User-Agent: Mutt/1.4.1i Subject: Re: [PHP-DEV] zend_lookup_class() From: andrei@gravitonic.com (Andrei Zmievski) On Sat, 05 Apr 2003, Andi Gutmans wrote: > I'm not sure if it's a good idea to change it or if we'd want a new > function because zend_lookup_class() is used in the core executor and this > would just slow it down. Can you give me an example of where you'd want > this to work? zend_builtin_functions.c: 575: if (zend_lookup_class(Z_STRVAL_PP(arg), Z_STRLEN_PP(arg), &pce TSRMLS_CC) == SUCCESS) { 673: if (zend_lookup_class(lcname, Z_STRLEN_PP(class_name), &pce TSRMLS_CC) == FAILURE) { 740: if (zend_lookup_class(Z_STRVAL_PP(class), Z_STRLEN_PP(class), &pce TSRMLS_CC) == SUCCESS) { Basically, any functions that take the name of a class and need to obtain the corresponding class entry, should also be able to take the namespace::class syntax. zend_lookup_class() seems like the best place to accomplish it. Any other suggestions? -Andrei http://www.gravitonic.com/ * Gun manufacturers don't make bad products, bad parents do. *