Re: Re: RE : [PHP-DEV] [PATCH] in_class_exists() for detecting __autoload() called by class_exists() and interface_exists()

From: Date: Sat, 06 Oct 2007 17:58:50 +0000
Subject: Re: Re: RE : [PHP-DEV] [PATCH] in_class_exists() for detecting __autoload() called by class_exists() and interface_exists()
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-32675@lists.php.net to get a copy of this message
Hello Alexey, that is probably but i wouldn't like it. I think we are going to make it to complex, tooooo Java like. Keep it simple. The only bad thing is a bit of a slowdown - eventually - where not loading all classes always by include isn't slower anyway. That said what we need to solve is the problem of emitting usefull errors. So maybe the idea of knowing whether the class is required or optional is the key here. Because once we have that we can already do what we need. The one resplonsible handler simply emits the error and we're done. If it doesn't know whether the class is necessary or not we cannot do so. marcus Saturday, October 6, 2007, 12:02:15 PM, you wrote: > On 10/6/07, Stanislav Malyshev <stas@zend.com> wrote: >> >> Then loader should be able to tell the engine that it shouldn't try >> another handler. > I am not sure, that is a good idea. > Probably, it would be better to allow registering different autoload > functions per-namespace basis? > I think that can be done by extending spl_autoload_* family of > functions and leaving autoload_register() as low-levelish as it is now > -- > Alexey Zakhlestin > http://blog.milkfarmsoft.com/ Best regards, Marcus

« previous php.internals (#32675) next »