I have written this small patch to support class autoloading. It
is written in the spirit of the unserialize callback (see
http://www.php.net/manual/en/function.unserialize.php) and uses
the same callback function.
Can someone with write access to CVS please commit the patch?
I assume that this is a safe thing to do because the same
mechanism is already in use in the production code.
Example:
function _autoload($classname) {
@include_once("class.$classname.php");
}
ini_set("unserialize_callback_func", "_autoload");
// the following will work even if class X has
// not be defined so far
$x = new X();
--
Ivan Ristic, [EMAIL PROTECTED]
[ Weblog on PHP, Software development, Intranets,
and Knowledge Management: http://www.webkreator.com ]
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php