![]() ![]() ![]() In PHP language, we have to make sure a class's definition is loaded prior to using it. This will give you a clear picture how autoloading in PHP has involved during the years. Let's take a look at the history of autoloading. If you aren't familiar with autoloading, it is basically a way for PHP to include classes without writing cluttered include/require statements everywhere. #PSR-0, PSR-4īoth PSR-0 and PSR-4 are standards for autoloading. For further details on each one, the respective link are provided. The purpose of this chapter is to introduce you to the ideas of PSRs. In this chapter, we will discuss each PSR briefly. The purpose of FIG is for project representatives to talk about the commonalities between their projects and find ways to work together.Īt the time of this writing, there are six accepted PSRs: two of them are about autoloading, two of them are related to PHP coding style and the remaining are about interfaces. For instance, for coding style, some people preferred Zend Framework Coding Standard, and some liked PEAR Coding Standards, and still others chose to create their own naming conventions and coding style.Ī group of people, representing various popular PHP projects came together in 2009 and formed something called Framework Interoperability Group(FIG). Prior to PHP Standards Recommendation (PSR), there were no truly uniformed standards for writing PHP code. ![]()
0 Comments
Leave a Reply. |