Top PHP Frameworks to Keep an Eye on in 2020

In our earlier article, we clashed two web development platforms, PHP and Python, in an attempt to find out who is the ultimate winner. As it turned out, both of them can become your go-to platform depending on a range of external factors. For example, your experience and presence of shared environments. The competitors keep up with each other in most of the comparison criteria like community support, debugging, and frameworks. 

Today, we’ll dig deeper into the framework topic and get to know what to look for in popular PHP frameworks.

What is a PHP framework?

A PHP framework is a platform for creating web apps. It helps to streamline the development process providing the basic structure for app building.

A PHP framework contains a set of libraries, classes, and elements of design pattern realization on which software engineers code.

Why use a PHP framework?

Employing a framework allows developers to focus on creating the actual website application instead of spending infinite time on writing repetitive code. Other advantages include:

  • Increased speed of development due to the reuse of code across projects.
  • More stable applications. A framework ensures proper database interaction with code on the presentation layer. 
  • Security. The frameworks are open-source, so any security issue is quickly spotted and fixed by community members.
  • Easy maintenance. Coding with PHP frameworks doesn’t differ from doing it in Core PHP. So any PHP developer can fix or debug something in your application. 

However, you should keep in mind the disadvantages of using a PHP web framework.

  • Slower execution. PHP libraries and classes add complexity and overhead. If you are running a quick script and API with limited functionality, a simple PHP script might be a better choice.
  • Learning. It will take time to understand the design patterns behind PHP frameworks if you want to keep your app structured. So if your project is small, it will be reasonable to use the libraries you are familiar with.
  • Too general for specific problems. A framework encompasses a range of solutions for recurring requirements of developers. You will solve your specific problem but at the same time get functionalities you don’t need and will have to remove them. 

That is why it’s important to choose the PHP framework that fits your app’s needs. 

Overview of the best PHP frameworks in 2020

We are going to compare six most used PHP frameworks:

  • Laravel
  • Symfony
  • Zend 
  • YII/YII2
  • CakePHP
  • CodeIgniter

Let’s first view how the technologies have trended over time in Stack Overflow and Google. According to Stack Overflow, Laravel is way ahead of its peers with around 1.6% of questions by 2020. Symfony and CodeIgniter follow the leader, with around 0.2% of questions.

PHP framework performance according to Stack Overflow

PHP framework performance according to Stack Overflow

If we compare the top three PHP frameworks in Google Trends for the past 12 months, we’ll see that Laravel outperforms the rest of the gang as well.

The numbers in the picture represent search interest relative to the highest point on the chart for the given time worldwide. A value of 100 is the peak popularity for the term. Laravel has scored 93, Symfony – 18, and Codeigniter – 14.

Top 3 frameworks in Google Trends

Top 3 frameworks in Google Trends

That’s how other frameworks perform: YII2 has scored 73, CakePHP – 57, Zend – 37, and YII – 36. 

Other PHP frameworks in Google Trends

The tables below represent more parameters to compare the six PHP frameworks, such as release date, popularity, PHP version required, and speed.

Basic information

Frameworks Laravel Symfony Zend YII/YII2 CakePHP CodeIgniter
Release date 2011 2010 2006 2010/2013 2005 2006
Website Website Website Website Website Website Website
Tutorials Tutorial Tutorial Tutorial Tutorial Tutorial Tutorial
GitHub URL GitHub GitHub GitHub GitHub GitHub GitHub
Current version 5.8 4.2 3

2.0.5

3.7 3.1.10
PHP version required 5.6.4 5.6.0 5.6 5.4 5.6 5.3.7
License MiT license  MiT license New BSD License New BSD License  MiT license  MiT license

Popularity

We don’t recommend to go by this criterion alone. However, popular frameworks have a wider community, hence more information and help for developers

Frameworks Laravel Symphony Zend YII/YII2 CakePHP CodeIgniter
GitHub stars 56.8K 22.4K 5.7K 4.9K/ 13K 8.1K 17.8K
Twitter followers 108.2K 36K 47.4K 14K 17.7K 23.2K
Downloads (from Packagist) 79M+ 46.2M+ 5M+ 2.1M+ 4.9M+ 610K+

Features

The following table covers the essential features to look at while choosing a PHP framework for your project. 

Speed determines how swift your web application will be. Object-relational mapping (ORM) are the components that help you to transform your database access in a more object-oriented manner. Code generation creates files and default content automatically. Edge Side Includes (ESI) allows to cache the whole page and update only those parts that have changed. Extensive cache storage will cover the most advanced cash needs. Multiple databases will fit more data and provide better security for it.

Framework Laravel Symfony Zend YII/YII2 CakePHP CodeIgniter
Speed (Rest API) 5.5 ms 2.2 ms 3.9 ms 3.2 ms (slowest) 5.8 ms no information
ORM ELOQUENT ORM (active record) Doctrine 2,
Propel (active record)
Doctrine, ZF Database
Access Objects (DAO),
Active Record (AR)
Custom ActiveRecord
Code generation CLI CLI no information YII CLI, GII (Web based) CLI no information
ESI no information Yes,
include tag only
no information no information no information no information
Cache storage File System, Database, Memcached, APC,
Redis, Xcache, WinCache, Memory (Arrays)

HTTP,
APC,
eAccelerator,
XCache

no information

APC, Database,
eAccelerator,
File,
Memcache,
WinCache,
XCache,
ZendPlatform

Memcache, APC File, APC, Memcache, Redis File,
APC, Memcached, XCache
Multiple databases Yes Yes No Yes Yes Yes

Demand

We’ll round up our PHP framework comparison with the final table demonstrating the general situation on the job market. We’ve consulted two biggest job-listing search engines: Indeed and Monster. As you can see, both search engines give the same top three: Laravel, Symfony, and Zend.

Indeed

Framework Laravel Symfony Zend YII/YII2 CakePHP CodeIgniter
Number of jobs 829 398 175 35 22 60

Monster

Framework Laravel Symfony Zend YII/YII2 CakePHP CodeIgniter
Number of jobs 93 47 24 7 9 11

On a final note

PHP frameworks are a great way for a novice developer to gain vast experience in creating web apps. Their code is well-tested, you get to know all the best practices and get support from the community. 

Even if you are an expert PHP developer and don’t usually use frameworks, they can still be a helping hand in projects with tight deadlines. Which framework to choose depends on the specific requirements of the project.

We use cookies to personalize our service and to improve your experience on the website and its subdomains. We also use this information for analytics.

Got it!