Towards the end of my talk at phpDay in Verona, I was asked by two developers which framework I thought they should learn: Symfony or Laravel. I understand the pressure that developers feel like they’re under to learn a framework, and to somewhat “predict the future” by figuring out what is likely to be popular in PHP for the next few years.

But my answer to them wasn’t what they expected. I told them that if they were new to PHP, that they should focus on learning PHP.

The siren song of frameworks

To a new developer just entering PHP, the framework can be an alluring siren, calling from afar. After all frameworks are powerful: they abstract away much of the mundane cruft that every application must implement, letting us focus instead on writing the code that makes our applications unique.

I can see the appeal. And yet, I believe that being framework specific is a serious disadvantage to any professional developer.

Starting with a framework leaves you tribal. It also disadvantages you when your framework of choice is no longer on top or popular. Anyone developing against Kohana or CodeIgniter knows well the terror that comes with suddenly finding your framework out of date and unsupported.

Learning the language is better.

Instead of focusing on a framework, focus on the language. This has some distinct advantages.

A developer who knows the language can take any well-documented framework and be up and running in a few days’ time. I know this is true of me, and it’s true of almost every great developer I know. Their knowledge of the language makes it possible to dive deeply into the framework, figure out how it works, and most importantly, adjust it if necessary. But developers who don’t know much about the underlying language have a harder time doing this.

In addition, it’s likely that the popular framework of today won’t be the popular framework of tomorrow. Right now Laravel is hot; a long time ago, it was CakePHP. What’s next? I don’t know. But I know that I don’t want to bet the farm on a single framework.

PHP isn’t Ruby, where there’s Rails or GTFO. We have so many frameworks that it’s nearly impossible to count them all. Many of them are wonderful frameworks with tremendous power. And yet, changes in the language or the state of our industry can render a framework out of favor almost immediately (Zend Framework 1 was hugely popular, and then PHP 5.3 came out).

The bottom line

Laravel is great. So is Symfony, and Silex, and AuraPHP and CakePHP. All of them are great frameworks with tremendous potential. And yet not one of them is a substitute for understanding PHP.

Understanding the language is what makes you a great developer. So, if you’re struggling with knowing where to place your bets, bet on PHP itself. Chances are good you won’t lose.

Frustrated with your company’s development practices? You don't have to be! No matter what the issues are, they can be fixed. You can begin to shed light on these issues with my handy checklist. Plus, I'll help you with strategies to approach the issues at the organization level and "punch above your weight."

Great! We'll be updating you soon on best practices for your team!

Brandon Savage is the author of Mastering Object Oriented PHP and Practical Design Patterns in PHP