Update: If you’d like to take part in the next high-yield survey from SitePoint, please vote for your favorite IDE here. The aim of the survey is to gauge the PHP community, and to find the most popular IDE in use today, by gender, location, skill level, and more.
The end of the year is upon us. Lots has changed in the PHP world in the past 365 days, and the PHP framework scene is more densely populated than ever. Everyone and their dog seems to have an idea of what a good framework should look like, but in the end, do we even know which frameworks actually end up being used in production projects? How many go beyond the stage of thousands of people just doing a demo app in them?
In a small survey we've held open for the past week or so (which has also been mentioned in PHP Weekly), we asked these questions to decide which frameworks deserve our attention in 2014 the most. The prerequisite for participation was merely having experience in more than one framework, seeing as it's pointless to ask someone what their favorite bar was if they've only drunk in one place.
Unfortunately, a big percentage of the answers had to be discarded due to people either refusing the notion that WordPress and similar suites aren't frameworks, or simply due to a blatant disregard of instructions – many responses were written by people who only ever worked in one framework. While their enthusiasm for this framework of choice is noteworthy and admirable, the final result which may end up being skewed by such approaches could hardly be called objective.
After discarding the invalid responses, and manually verifying every participant, we were left with the following data:
According to the results, the most promising frameworks for 2014 seem to be:
Yii and CodeIgniter seem to be sharing 4th place.
After weeding out the obvious spam, the Laravel results had to be filtered the most, by far. Over half the people who voted for Laravel had zero proof of proficiency, or experience only with Laravel, and had to be discarded – despite this, it still prevailed.
When looking at the answers, on average, the Laravel community seems to mostly favor the ease of entry – virtually no learning curve. Whether that's good or bad is a discussion for another time, seeing as we ended up in this "PHP is bad" mess mostly due to a horde of newbies considering it an easy to enter market, but the excellent documentation, large scale community support and speed of development definitely work in its favor. Another frequently mentioned advantage seems to be an active and impressively alive IRC channel where help is given instantly.
An interesting misconception seems to be that Laravel is responsible for Composer. Many voters, both discarded and valid ones, mention Composer as the main advantage of Laravel, alongside Eloquent ORM and the Blade template engine, which is downright odd seeing as Composer is a package manager completely oblivious to the framework it's being used with, if any. For more information, I urge the participants in question to read some of our Composer articles, like this one. Despite all this, having only tried Laravel in demo projects, the results of this survey have piqued my interest enough to build my next production project in it, powered by HHVM.
Phalcon's main advantage was performance over other frameworks and the fact that the framework is such a rounded up package (ORM, template engine, PHQL and more – all in one – little to no need for third party libs, meaning everything stays in-memory, C-based and super fast). Some of the respondents noted the fact that it's installed as an extension as an advantage, because the process of installation weeds out the hobbyists from the serious developers, a notion I personally tend to agree with. When mentioning cons, Phalcon's biggest one was also its biggest advantage – being written in C, it's nigh impossible to check under the hood.
Symfony2 is touted as the most modular and extensible of the bunch, and the most feature complete, mainly due to containing Doctrine2. Its voters, however, do seem able to admit that it's quite bloated and slow at times due to this feature-richness.
Interestingly, two ZF1 answers said they're stuck on said framework because of the work situation – their team or CTO refuses to switch to something more modern.
Among the valid answers, here are some detailed enough to warrant a repost:
Yii's built in ActiveRecord and migration systems make version control of the database easy and development using objects quick and painless. It takes a small amount of time to learn but become super simple afterwards – becoming worth it's namesake "Yii" – Chinese for "easy"
I've used CodeIgniter for years but eventually came a point where it didn't offer what I needed. I needed a somewhat full stack framework (so micro frameworks like Slim, Silex were out) with little or no learning curve (just like CI), which had a neat & clean intuitive API, solid code written on proven design patterns, which didn't bind me in one mindset, which was fast and had good documentation, which allowed TDD without fuss and which had a good community & resources available. Also one which allowed me to take a peek under the hood easily so I can see what goes on where (which ruled Phalcon out since its source is in C). Laravel & Symfony came very close but I eventually went with Laravel as I liked how it did things more.
panique doesn't use any of the listed ones, and says:
Most frameworks are simply too advanced, making it hard for non-professional developers or frontend people to quickly build good things, so I was always searching for a naked and totally stripped-down PHP barebone application. php-mvc solves this problem and reduces the learning curve to a total time of under 30 minutes while still being very professional and self-explaining.
+Jream says this about Phalcon:
Provides all the core components I need to get going fast, beautiful ORM. It's feature rich, insanely fast, and has amazing documentation.
Chris Thompson proves that exposure and name mean much in the PHP world by saying this about his choice of ZF2:
I was already familiar with ZF1 from a previous project. ZF2 seemed the most logical one to use for our next project. We didn't have any experience with or exposure to most of the other frameworks. Ones that we were aware of had less documentation, examples, and online help (stackoverflow) than ZF2.
Peter Nijssen explains:
Been working with CodeIgniter for 4 years. Always suited me well and I wrote some sparks for it. Always has been a nice quick framework to start with. Easy to use. Since CodeIgniter was not on going anymore, while PHP made some major steps, I came in touch with Laravel. Immediately fell in love with it and still love it to this date. A framework which works excellent and is very developer-friendly. In my daily job, we are migrating everything from CodeIgniter to Symfony. In my personal life I would pick Laravel, while in professional life I would pick symfony. Laravel is more developer friendly and makes it a breeze to develop against. Symfony gives me currently more trust in the fact that they have been proven themselves already for years. Of course, both contain their similarities by Laravel who is using Symfony parts.
Thiago Colares chooses TYPO3 Flow:
Architecture-ready for domain driven design. Dependency injection. Uses the Doctrine 2 ORM. Advanced template engine (Fluid). Strong, active, very skilled and helpful community
Rob Keplin says this about Phalcon:
It takes advantage of other popular framework's features such as event management, an easy to use ORM, all while promoting DI and taking advantage of newer PHP features like native namespaces. Since it is built as an extension, the framework has very little overhead. Not to mention the documentation makes for an easy learning curve. The only drawback is portability and I'm not able to dig through the library code while developing. But I'm really excited to see it grow and become more popular.
… and Sean M adds
Phalcon makes it easy to design modern web application correctly, and makes it hard to design them incorrectly. Using direct injection, it is trivially easy to create software that tests fully end-to-end. An ORM that makes sensible default choices and is hugely extensible and configurable, multiple caching strategies, and built-in DB libraries for tons of helpers to allow for easy horizontal scalability. Add in the huge speed gains and trivial memory usage realized by using a shared-library written in C for all your requests, and you get a stack that is a true pleasure to work with and an absolute workhorse in production.
@DwightConrad about Laravel:
Laravel uses the solid, tested components of the Symfony framework along with other popular packages to provide a modern framework that provides easy conventions, utilises modern programming patterns and makes development a breeze. It is refreshing to see PHP used as a modern programming language with a framework that takes hints from some of the big names outside of the PHP community.
Stanlemon favors Symfony2:
Architecturally I prefer Symfony 2. I think it's attempt at componentization is admirable and the overall approach of bundles is brilliant. At times it can feel bloated and still at other times I wish it were more opinionated, but all in all it represents the only full stack framework that just lets me get things done the way that I want to. The use of Doctrine 2, Twig and Monolog and a powerful approach to functional testing is only further encouragement to use it.
It's no secret I'm a fan of Phalcon. I've used Zend 1 and 2 in large scale enterprise projects for years, and I did my time with CodeIginter. After testing (no commercial experience) all the frameworks in the list, I came to the conclusion that, deep down, they're all incredibly similar (except for Zend, which just stands out like a sore thumb). It was upon that realization that I redirected all my focus on the performance/robustness ratio instead, and found Phalcon. Phalcon has been sufficiently covered in previous articles – suffice it to say that having such a blazing fast framework pre-loaded in memory does wonders for your cloud bills (whether you use AWS, Azure or any others – the instance hours are delightfully shaved off – more on that in a future article).
The fact that it's harder to install than the others (and nigh impossible on shared environments) also makes sure the community is a hardcore one, filled to the brim with people who are genuinely interested in it enough to not get bogged down by the basics. This means a tighter-knit group, but far more knowledgeable.
So which framework seems most promising for 2014? Which should you switch to in the new year? Is it worth it? That's entirely up to you – as always, it depends on your comfort level, the project requirements, and time you have to study new things.
The only wrong choice is constraining yourself to only a single framework. Diversify, experiment, contribute. Step out of your comfort zone and try something new – there's no other way to grow. Perhaps next year, you'll vote differently!
I want to personally thank you for participating in the survey, and being our readers. We hope to bring you increasingly more awesome articles in 2014, and look forward to sharing the knowledge of our amazing authors with you. The entire team here at SitePoint wishes you a Happy New Year and jolly holidays! See you over the hump!
The Principles of Beautiful Web Design, 4th Edition
Learn CSS in One Day and Learn It Well
Learn PHP in One Day and Learn It Well