Hi! > Because Foo_Bar could be *defined* under a different name, say, > Foo_Blah. Then, as soon as someone needed Foo_Bar, we would use > class_alias to add an alias. That is, as soon as someone tried using
class_alias is a dirty hack. instanceof implies that the object is an instance of specific class. If the class is not loaded, no object can be an instance of it. So no autoloading is necessary. > Foo_Bar it would turn out that Foo_Bar and Foo_Blah are the same class > and all Foo_Blah objects are *also* Foo_Bar objects and everything is > cool. Therefore foo(new Foo_Blah()) would work (if there was autoload). > > Please see the demo I provided at https://bugs.php.net/bug.php?id=61422 I do not see how anything good can come out of encouraging stuff like this. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php