Gerard Samuel wrote:
...
I haven't checked the source on this one so I can't guarantee that what I've said above is true, but I believe it to be true. Someone correct me if I'm wrong (wouldn't be the first time ;)
seems to me like you 'on the money'.
I just wanted to add that IMHO use of __autoload() is over rated (too much magic is not alway a good thing) in the general case, i.e. use it for specific types of classes like dataobject classes that are generated on the fly - but don't use it as a catchall handler
If you are using Exception classes and other 'framework' type classes then I would suggest that a set of require_once statements in a global file will:
a, suffice b, make things more managable (i.e. includes are explicit)
if there is a speed issue with not using __autoload() then it might still be worth only implementing __autoload() for general/all cases if:
a, sqeezing out a few microseconds is _really_ needed
b, your client (if you have one!) is willing to compensate you for the countless hours of code profiling and speedmeasuring required to increase speed thru optimization ;-)
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php