Things To Consider

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 as full-stack frameworks.

Microframeworks are usually small in size and scope. They are not designed to dictate the app architecture much, instead focusing on doing a limited number of things. Most of them provide a router and a way to render views.

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.