News Feed
Sections




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

PHPro.org:
SPL Autoload
November 14, 2008 @ 09:31:48

On the PHPro.org 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

PHP Thinktank Blog: SPL and php.NET (phalanger) IRC logs

php|architect: PHP 5.3 namespaces for the rest of us

PerishablePress.com: Encoding & Decoding PHP Code

ThinkPHP Blog: Creating press-ready PDF documents on the fly including individual barcodes

IBM developerWorks: Create a productivity package with the Zend Framework V1.5 & Google applications


Community Events

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


interview language yii2 symfony community application laravel introduction testing composer list podcast api example part2 php7 framework opinion project series

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