Should PHP Developers Learn the Newest Frameworks or Stick to the Classics?

Web Development
PHP Developers

PHP, much like most programming languages, is very slow to evolve. If you coded PHP five or even ten years ago and know the basics of object-oriented programming, then you will still be able to read and write PHP code today. Even when a new branch is released, the adoption rate is very slow, and PHP developers are often reluctant to use new features since their code won’t be portable if moved to an older shared server using an older version of PHP.

However, unlike .NET and Ruby on Rails, PHP is just a language and not a complete framework. Although PHP alone will suffice for small sites that require minimal PHP code and are mostly HTML, when you start building medium to large scale projects, you really need to use a framework. 

A Model View Controller (MVC) Framework will keep your code organized and divided and will allow you to re-use code in the framework for common tasks shared between most typical web projects (login, roles and permissions, forms, grids etc.). PHP developers often face the challenge of deciding which framework to use for their projects. The question every new PHP developer asks is, “what framework should I learn?”

So what framework should you learn?

My first introduction to the MVC paradigm was through Zend, one of the oldest and heavily used PHP frameworks. I didn’t have a choice since I was taking over a project from an Indian team and learned a lot about the framework from learning their code, which I had to work on. For PHP developers, Zend offers a glimpse into the complexities of older frameworks. 

Like older frameworks, Zend is somewhat bloated and slow. It tries to get involved in every aspect of your website (Zend buttons, Zend forms, etc.). With older mature frameworks like Zend and Symfony2, even a simple Hello World page has a lag due to the overhead of the framework. The upside is that these two beasts have been around for a while, have a stable and robust code base, and a huge community.

I was tasked with starting a new large-scale project about two years ago and did some serious research into PHP frameworks at the time. For PHP developers, choosing the right framework can make or break a project, so I chose to go with Yii. It was very popular, brand new, fast, and cool. 

It came with code that would pre-build your models from a database schema including foreign relations, which work with Yii’s active records. I’m still working on this project today and have been happy with the framework. However, as time passed, so did the fad. Newer, cooler, and faster frameworks came out, and the Yii community went down to 7.6% of PHP projects (see graph below for the popularity of various PHP networks). 

When starting my next large project should I jump on the bandwagon and start learning Laravel or Phalcon or continue with Yii or Zend? Once Yii2 or another new framework comes out, support for Laravel and Phalcon will go down as new developers look for the latest and coolest. 

Furthermore, new frameworks may not have stable code nor a lot of help forums to research issues. There is a steep learning curve in tackling a new framework and it’s not worth it for just one project if you know another framework better.

In conclusion, most of the MVC frameworks available today are more or less the same. They provide a secure skeleton that forces you to keep your code organized and can speed up development if you know the syntax well. 

Once you have learned a framework well, stick with it! Join communities, help out beginners, and even consider contributing to its code base or reporting bugs. For PHP developers, the issue is less about which framework you choose and more about how you use it. Like a programming language, don’t take shortcuts or hack the framework; use it as it was meant to be used.

Do you need help with your development needs? Contact us today.

Frequently Asked Questions

Why is PHP slow to evolve compared to other programming languages?

PHP evolves slowly because it prioritizes backward compatibility, ensuring older code remains functional even with newer versions. This deliberate pace makes it accessible to developers familiar with older PHP versions.

Why do PHP developers prefer frameworks for medium to large projects?

Frameworks help PHP developers organize their code using the MVC (Model View Controller) paradigm, which improves scalability, maintainability, and code reuse for common tasks like authentication, form handling, and database operations.

What are the challenges PHP developers face when choosing a framework?

PHP developers often struggle with:

  • Framework adoption rates are slow in shared hosting environments.
  • Deciding between mature, robust frameworks like Zend or Symfony and newer, faster frameworks like Laravel or Phalcon.
  • Balancing the steep learning curve of new frameworks with the benefits of sticking to familiar tools.

Which PHP frameworks are recommended for beginners?

Laravel is highly recommended due to its intuitive syntax, strong documentation, and active community. Other options include Symfony for enterprise-level projects and CodeIgniter for lightweight applications.

What is the advantage of using mature frameworks like Zend or Symfony?

Mature frameworks like Zend or Symfony offer stable codebases, extensive community support, and robust features. However, they may feel bloated or slower compared to newer frameworks.

Share: