Class names (with regard to autoload)

From: Date: Thu, 26 Feb 2009 20:27:36 +0000
Subject: Class names (with regard to autoload)
Groups: php.internals 
Request: Send a blank email to internals+get-43191@lists.php.net to get a copy of this message
Hi all, I've been playing around with autoload lately, and specifically using autoload to load classes which may be in subdirectories. I came up with the following test script: <?php function __autoload($sName) { echo "autoloading " . $sName . "\n"; } $s = "Foo.Bar"; $a = new $s(); $b = new Foo.Bar(); ?> The first line demonstrates what I'm after ("autoloading Foo.Bar"), and the second seems to give a bit of an odd/incorrect (in these circumstances) result(__autoload is invoked with "Foo"). Is it possible to reconcile this behaviour to be a bit more consistant, and provide the behaviour I'm after? I'm willing to try provide a patch, if someone would be kind enough to direct me to the part(s) of the engine I'd need to look at. Thanks, Robin

« previous php.internals (#43191) next »