News Feed
Sections




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

DevShed:
Using the spl_autoload() Functions to Build Loader Apps in PHP
July 03, 2009 @ 08:26:58

In the next to last article of their loader series, DevShed looks at replacing some of the file loading functionality in their examples with functions from the SPL.

As I mentioned before, the Standard PHP library comes bundled with some helpful functions, such as "spl_autoload()," "spl_register_extension()" and "spl_autoload_register()" that allow you to either use a default implementation of the "__autoload()" function, or create a custom one for it.

Their example defines the extensions to use for autoloading and the name of the file/class to pull in. The rest is done automagically.

0 comments voice your opinion now!
tutorial autoload spl


blog comments powered by Disqus

Similar Posts

Matthias Noback: Symfony2: How to create framework independent controllers?

Zend Developer Zone: 2 Beginners Guides I Wish I had when I Started with PHP

Zend Developer Zone: Working with RAR, LZF and BZ2 Compression Formats in PHP

Kevin Schroeder: (Starting) Using Dependency Injection in Magento 2

Codrops Blog: Fresh Sliding Thumbnails Gallery with jQuery and PHP


Community Events





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


tool language release library community interview opinion series composer framework list introduction security laravel symfony artisanfiles podcast conference voicesoftheelephpant version

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