News Feed

News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way
SPL Autoload
November 14, 2008 @ 09:31:48

On the website, Kevin Waterson has written up an introduction to the handy autoloading functionality that comes with PHP5 releases - the __autoload method from the Standard PHP Library (SPL).

The SPL __autoload() method is one of the Magic Methods supplied in PHP. The __autoload method is called whenever a class is instantiated and will load the classs the the first time it is called. No longer is include(), require, include_once() or require_once needed as the SPL autoload takes care of this interally.

He looks at how you can use it to load a directory of classes, how to use multiple autoloads in a single script and how to use it with interfaces to register a loader and include it as needed.

0 comments voice your opinion now!
spl autoload standardphplibrary tutorial introduction directory register multiple

blog comments powered by Disqus

Similar Posts

Tobias Schlitt's Blog: PHPUGDO plans "PHP introduction workshop" Web Routing in PHP with Aura.Router

DevShed: Introducing Static Members and Methods in PHP 5 (Part 1)

Johannes Schluter's Blog: DTraceing around Simple System Maintenance with PHP-CLI

Community Events

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

api community interview opinion install framework code podcast language introduction release threedevsandamaybe laravel series developer list refactor testing unittest wordpress

All content copyright, 2014 :: - Powered by the Solar PHP Framework