Which is the best PHP Framework in 2013?

Posted on: August 26th, 2013 by taff 4 Comments

Finding the best PHP framework is hard. Asking for PHP Framework suggestions on a forum gets you nearly as many different opinions as replies. Asking on stackoverflow normally gets the question blocked because it doesn't adhere to their Q&A.

There are so many aspects to take into account when choosing a PHP framework and I think it goes a lot further than how the syntax looks and what feels right.

Wikipedia offers a large tabled comparison of PHP frameworks allowing you to see what features are offered. There are however a few missing and I am not sure if all those green fields should be that colour.

We don't want to have to dabble in a new PHP Framework in six months because a new project has Perfomance as the highest priority and we decided to go with Zend. Maybe we don't want to go with CodeIgniter when it has an insecure future. Maybe the fact that cakephp has no templating engline puts us off, maybe just that fact appeals to us. To that end I think the best way is to setup a matrix listing the points that we feel are most relevant. Your grid may contain a lot more PHP frameworks. The following list had already been hit by the best PHP framework equivalent of the nerf bat, based on general performance.

Best PHP Framework based upon Performance

  • Yii
  • CakePHP / Liquify
  • Phalcon
  • Kohana
  • Codeigniter

I can hear lots of calls of cake and performance but I left it in as I have used it in the past for a large project and it scaled well. This would speed up development.

How to choose the best PHP framework

My criteria when choosing the best PHP framework for me was based on the following:

What do I want out of the framework?

Generally I want it to be fast and functional. As long as I can include a class from, or have some other way of including third-party code and get things working quickly I only really need the following to do the bulk of heavy lifting:

PHP Framework Functionality

  • Caching: All PHP frameworks have various caching capabilities so this isn't going to help with my decision.
  • Form validation / generation: This is one of the biggy's. I want the ability to generate forms automatically and be able to implement validation for 90% of my fields whilst still half asleep 😉
  • Unit testing: I want to be able to use PHPUnit to automate app testing but may look at alternatives if the rest of the framework is godlike.
  • Session Management: What session features does the framework bring with it?
  • ACL: Some type of user management / access control out of the box is a must. Fortunately most offer just that.
  • Templating: Smarty, Twig, which template engine do I want? Do I even need one and if so what is the performance price I have to pay to avoid lots of php tags in my view?

Other Criteria

Just because the frameworks in our shortlist have (nearly) all the above functionality out of the box, there are a few other points we should take into account if we want a long and happy relationship with our framework.

  • Age: I'm not sure how you feel about this point, but I want my new framework to be too young. I also don't want it to still be supporting PHP4 so a happy medium needs to be found.
  • Javascript: If we have a favourite Javascript library, does the framework support it?
  • Documentation: We all know how important good documentation is. It will allow to get so much more out of the framework, save us time and stop us swearing quite so often.
  • Community: When you are dabbling in your new framework prior to the final decision, take some time to look at the community. Active and friendly communities are a game winner.
  • Pros and Cons: These are the points that don't fit in somewhere else, but will influence your decision either positively or negatively. This could be the fact that a framework still supports an old version of PHP, maybe they don't have a dedicated forum etc.

These are the points that I use to help when deciding which is the best PHP framework for me. I look forward to hearing what criteria you use to help youmake a decision

4 Responses

  1. Gazzer

    October 8, 2013

    Laravel ftw!

    • taff

      October 8, 2013

      I read about Laravel a few days back but haven’t had a chance to try it out yet. I like the chain syntax but I’m not sure how readable it will be in a real world scenario with a few joins

  2. Daniel Voyce

    December 16, 2013

    CakePHP hands down for a real world application it is tried and tested. I’m really not sure where it got its reputation for being slow from, it is like ANY PHP application, it can be tuned, since CakePHP 2.3 APC caching is turned on by default and the rest of it comes down to the programmer, I am running a busy Enterprise SaaS service built on CakePHP and it hasnt skipped a beat so far (and on pretty average hardware!)

    As for your requirements list, CakePHP delivers on every single one of them – and the things that dont come with the core there are a ton of plugins you can find written by both Cake core developers and others that will provide the functionality for you.

    • taff

      December 17, 2013

      Thanks for your reply. I have used cakePHP (1.2) for a large project in the past. It scaled well and the documentation was second to none. The list I used was generated by colleagues at work, with performance as a priority. After some out of the box benchmarks it was decided against cakePHP. Whenever I need an application I always use cake. I’m not after the best performance ever if it means development time is fast.


Leave a Reply