News Feed
Sections




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

PHPKitchen:
Advantages of using the PEAR class naming convention
October 26, 2006 @ 07:51:00

Keeping with convention - well, naming convention - is a good thing sometimes. Demian Turner thinks so and talks about one of many reasons he sees to follow a standard set in place for a while now - the PEAR naming standard.

By far the most convincing reason to use the file naming convention, which means that a class located in your include path like Foo/Bar/Baz.php is called Foo_Bar_Baz, is the ability to take advantage of PHP 5's __autoload magic method.

The __autoload functionality in PHP 5 is definitely one of the most handy, elegant single lines of code out there and I'd definitely vote for anything that will make working with it even easier. Demian also includes a few lines of example code to show the interaction between the function and the files with the naming convention.

0 comments voice your opinion now!
pear class naming convention autoload simple reason pear class naming convention autoload simple reason


blog comments powered by Disqus

Similar Posts

SitePoint Web Blog: Is Ghost Really a WordPress Killer?

Till Klampaeckel's Blog: Quo vadis PEAR?

Community News: Latest PEAR Releases for 01.01.2007

PHPKitchen: Advantages of using the PEAR class naming convention

Soledad Pendaes' Blog: PHP will never have a (real) Rails-like framework


Community Events

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


extension release series podcast security api laravel laravel5 threedevsandamaybe voicesoftheelephpant interview version language introduction library opinion community symfony framework unittest

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