Re: zend_lookup_class()
| From: | Andrei Zmievski | Date: | Mon, 07 Apr 2003 15:14:26 +0000 |
| Subject: | Re: zend_lookup_class() | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-760@lists.php.net to get a copy of this message | ||
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. *