Re: [PHP-DEV] Re: Idea for namespace lookup resolution

2007-12-18 Thread Jessie Hernandez
Attached is a patch implementing my proposal. Basically, when inside a namespace, you must reference global classes using ::globalName or by having a "use ::globalName" statement. This allows classes inside namespaces to have the same name as internal ones without the need of explicitly "use"-

Re: [PHP-DEV] Re: Idea for namespace lookup resolution

2007-12-17 Thread Jessie Hernandez
Dmitry, As I mentioned, I did not find any significant performance penalty with this patch. Also, the patch can be improved by not checking the __get_namespace_classes function if we are not currently inside a namespace. Either way, if we ignore namespace imports, then the best solution would

Re: [PHP-DEV] Re: Idea for namespace lookup resolution

2007-12-17 Thread Dmitry Stogov
Hi Jessie, The namespace may include several files and it may be extended with additional files in any moment. So having single __get_namespace_classes() function will require to update it every time you extend namespace. Also such function will significantly slowdown access to internal cla