News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
What's your plan for __autoload()?
November 23, 2005 @ 06:03:21

In this latest post on the SitePoint PHP Blog today, there's a look at the __autoload function and a question - "what's your plan for it?"

Of all magic in PHP I probably like the __autoload() hook the most. It saves a good deal of tedious script inclusion calls and may drastically speed up your application by saving the parser from doing unnecessary work. Allthough it has been around since the release of PHP5, I haven't found any convincing applications for it yet.

He notes that there are drawbacks to its current usage (with an example of dynamic class loading) - namely directory and naming issues - and suggests a "class finder" to help work out the kinks. He, of course, gives his simple code for a "Smart loader" class to do the hard work for you...

0 comments voice your opinion now!
autoload dynamic class include autoload dynamic class include


blog comments powered by Disqus

Similar Posts

Joshua Eichorn\'s Blog: ZActiveRecord can\'t work?

Chris Hartjes' Blog: Tutorial: Integrating PHP/SWF Charts with CakePHP

Nick Halstead's Blog: Simple use of DIGG API for your blog

Evert Pot's Blog: Creating a Gopher server with PHP and InetD

DevShed: Using Introspective Methods with the DirectoryIterator Class in PHP 5


Community Events

Don't see your event here?
Let us know!


symfony2 interview series extension api conference introduction version xdebug framework php7 release podcast library voicesoftheelephpant example laravel community performance opinion

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework