PHP frameworks fall into different categories. One way to categorize them is through their size and architecture. These can be categorized as microframeworks, package based or in full-stack frameworks.
Full-stack frameworks are built to be all inclusive and to help the developer with the development of every part of an application from the user interface to the data store and everything in-between. This is in contrast to microframeworks which are much smaller in size and scope and do not try to interfere in every aspect of a web application. They usually do one thing and they try to do it as good as possible.
An important thing to keep in mind when choosing a PHP framework is the PHP version it is created with and the version it targets. Frameworks that are not designed for PHP 5.3+ miss out on a lot of important advancements in the PHP language such as namespaces and closures. Without some of these features, code organization and the architecture of the framework are limited.
Composer is an important dependency tool in PHP and something to keep in mind when choosing a framework. It is unfortunately very resource intensive but nevertheless it’s very important that a framework be compatible with it. However, Composer’s autoloader has been profiled over and over again several frameworks and it’s usually slower than any framework’s autoloader. So frameworks that can use Composer for dependency management but can optionally opt out of it’s autoloader tend to do better from a performance point of view.
Some frameworks are a little more restrictive when it comes to organizing the project. For example, they tell you where to put views and controllers or how to name models. Though usually modern frameworks are more flexible because of the use of namespaces.
One last important thing to keep in mind is test coverage and testing ability of a framework. Some frameworks may have a testing suite built in and customized to fit that framework’s needs. But the vast majority of them rely on PHPUnit to handle their tests, which requires additional configuration.
|11 Recommended Products||Default Template Engine||PHP version||Default ORM|
|#1 Laravel· · ·||Blade||5.4+||Eloquent|
|#2 Yii· · ·||Vanilla PHP||5.4+||Yii Active Record|
|#3 Symfony· · ·||Twig||5.3.9+||Doctrine|
|#4 Zend Framework· · ·||Zend_View||5.3+||No default, but an ORM can be installed.|
|#5 Kohana· · ·||KOstache||5.3.3+||Default ORM included out of the box|
|#6 CodeIgniter· · ·||Custom CodeIgniter engine||5.2.4+||DataMapper ORM|