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:
Battle of the Autoloaders PSR-0 vs. PSR-4
November 25, 2013 @ 13:09:15

The SitePoint PHP blog has a new post from editor Bruno Skvorc about a PSR standard (from the PHP-FIG group) that's proposing and update and slight change to the currently wide-practiced autoloading standard (PSR-0). This new standard, PSR-4, proposes a modification to the PSR-0 spec with a bit more strict guidelines.

If you've gone past the beginner stage in your PHP training, you've heard of PSR-0 - an autoloading standard that defines ways to automatically include PHP classes in your code without having to use statements like require and include. [...] When Composer showed up and took the PHP package management world by storm, things changed. Due to some of its rules, folders often duplicated and became too deep when looking at PSR-0 class installations via Composer. [...] Therefore, some highly qualified PHP devs got together and put together a suggestion for a new standard: PSR-4.

The goal behind PSR-4 is to define a new autoloading standard that removes allowances for things like the underscaore as a "namespacing" tool. Bruno makes some suggestions for the structure of your tools if you're going to go with PSR-4 and the handling of multiple autoloaders/paths in the same namespace.

0 comments voice your opinion now!
psr0 psr4 autloading composer package phpfig

Link: http://www.sitepoint.com/battle-autoloaders-psr-0-vs-psr-4/

blog comments powered by Disqus

Similar Posts

Zend Developer Zone: Reading and Writing MP3 and Photo Metadata with PECL

NetTuts.com: Setting Up a Local Mirror for Composer Packages With Satis

Mike Willbanks' Blog: RPM Packaging - Building and Deploying your own PHP

Travis Swicegood's Blog: PHPT_Ensure v0.1alpha and PHPT_Core v0.1.1alpha released

PHPied.com: SAP container for PEAR::Auth


Community Events

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


api library php7 security series introduction video release laravel unittest voicesoftheelephpant version laravel5 framework community interview language example podcast opinion

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