For the PHP community, the best news in 2016 was the release of version 7.1. While many initially saw PHP 7.1 as a minor release with bug fixes, it proved to be a whole different beast altogether. The version offered important improvements, a new return type (void) and Multi Catch Exception Handling.
This year, I went to the PHP community and asked about the general feelings and expectations about the trends that would dominate the PHP world in 2017. Essentially, I asked three questions in the Reddit thread:
- What was the best thing that happened to PHP in 2016?
- What does the community thinks of PHP 7 and 7.1?
- What is the best PHP framework?
In addition, I asked about the community’s response on the issue of official termination of support for PHP 5.6.
In addition to the Reddit, I also posed these questions via email to several community influencers. I received the following responses:
Versions 7 and 7.1 of PHP are not the revolutionary changes that we got in the later 5.x versions. They are however proof that PHP has stabilized, matured, and has a predictable path forward.
In response to the question about the frameworks, Evans was very clear.
Frameworks exist only to make developers lives better. Some developers won’t want to sweat the details, they want to just get things done. There is nothing wrong with this and frameworks like Laravel will always exist to fill this need. In our ecosystem, Laravel stands above all others with the tooling and ecosystem built around it to help developers just get things done.
Alex Makarov, a major contributor to Yii offered a personal insight for the question about PHP version 7+.
While 7.0 was excellent revolutionary release, there was design issue with return types and returning null preventing me from using it. 7.1 added nullable types and now I’m happy.
When talking about favorite PHP framework, Makarov added:
Depends on what is the definition of “the best”. If we’re talking about “most popular in US” then it should be Laravel. If it’s “most popular in ex-USSR and asia” then it’s Yii. If we’re talking about enterprise level support, that’s Symfony without any doubt. If it’s about features and performance, Yii has more out of the box.
Stefan Koopmanschap, cofounder of PHPBenelux loved PHP 7+.
I love it. I think it is a great step in the development of the language, PHP is a seriously mature language now, which can easily compete with other languages. And it’s being used for highly scalable and business-critical applications.
His response on the question of favorite framework echoed the sentiments of “framework-independent” developers.
There is no best framework. There is a best fit for every use case. Symfony, Laravel, Zend Framework, Yii, Expressive, Silex, Slim, the list is endless, and each of the frameworks has a place. Which framework fits your use case depends on the requirements of the application, the developers you have on your team, the infrastructure it will be running on, and a lot of other factors.
I would like to start discussing the Reddit poll with the comment by the Reddit user leeharris100, that sums up the PHP trends for 2017 very succinctly:
This is why I think PHP will continue to be popular for a long time to come. It’s easy to make applications of any size and scope. There is documentation and support for every single problem you could ever think of. And it’s finally hit the point where performance is mostly acceptable.
I ran a poll on Reddit and got some excellent answers from PHP experts, all over the world. I will now offer a summary of the answers to all four questions, so that the readers could form their own opinions.
What Was the Best Thing That Happened to PHP in 2016?
The majority of respondents agreed that speed was one area where PHP greatly improved in 2016. In the concise words of a Reddit commentator:
PHP is fast as h*ll!
The improvements in speed is the main benefit of PHP 7 (introduced near the end of 2015).
For some users, the best thing about 2016 was the increased maturity of PHP libraries and frameworks. I think Reddit user ajr901 put it best in the comment:
Speed, ease of development (sort of?), ease of deployment, arguably better frameworks and tooling available for PHP.
I believe that both these developments (the increase in speed and the maturity of libraries) are the direct result of the introduction of PHP 7 and 7.1. This brings me to the next question
What Does the Community Thinks About PHP 7 and 7.1?
The community loves the new PHP 7. The improvements in almost all areas of the language come together in a very fast package that removes one of the major complaints about PHP.
In the words of Reddit user hedsht:
it’s a major step into the right direction, type hinting will hopefully silence some haters.
The community agrees that PHP 7+ is the best thing that has happened to the language so far. Almost every respondent on Reddit and Facebook agreed that PHP has entered a whole new era with the introduction of PHP 7. PHP 7.1 sweetened the pot even further by introducing speed related improvements that have impacted every framework and library.
Many respondents felt that PHP is now ready for enterprise level projects because of the speed of PHP 7. A Reddit commentator the_goose_says wrote:
The most important thing about PHP in 2016 is speed. PHP has always been used by millions, but the largest companies have avoided it because speed matters so much at that level. With PHP 7+, we may have more household names using PHP.
What Is the Best PHP Framework?
The real meat of the discussion (and this is true for every PHP related discussion!) was about the framework preferred by the users. Everyone has their own favorite framework that they use in their projects. In response to the question about the best PHP framework, everyone opted for their own favorite.
I asked the community to select their favorite from Symfony, Yii2 and Laravel. Interestingly, some Reddit commentators also brought in Codeigniter and their own custom PHP frameworks into the debate.
Overwhelmly, the comments favored Laravel among the three, with Symfony coming in the second place. I think diabetesjones summed up the debate:
Laravel is the smoothest coding I’ve ever had. Yii is fight-the-system every step of the way.
Finally, on the question of the termination of support for PHP 5.6, the community was not very divided. Several commentators said that if PHP 5.6 projects have been implemented using the best practices, there is nothing to worry about. In the words of scootstah, a Reddit commentator:
Anything that is 5.6 compliant will be able to migrate to 7 with little to no difficulty. You’re only going to have problems if you were already 5 years behind the times.
What Will the (Probable) PHP Trends for 2017?
I see three major trends that would dominate the PHP world in the year 2017.
The first and the most probable trend is the complete dominance of PHP 7.x in all aspects of PHP development. In part this will be an outcome of the discontinued support for PHP5.6. However, the most important aspect of this trend is the fact that PHP 7.x introduced several important improvements to the language and PHP development for websites and web apps.
The second important and related PHP trend in 2017 would be the release of major versions of all important frameworks. Right now, the bulk of all major frameworks (Symfony, Laravel and Yii) is built on older versions of PHP. In 2017, the released versions would embrace PHP 7 completely and would make available the important features as part of the tooling and scaffolding of the frameworks.
Finally, major (and minor) web hosting providers of all flavors would upgrade to PHP 7.x. While this is a no-brainer, given the popularity of PHP7.x, anyone who has ever used a web host knows how difficult it is to get the web hosting company to upgrade anything! I think, 2017 would the year when PHP 7.x would be available as the default PHP version everywhere.
In conclusion, the PHP community is very optimistic about PHP 7+ and all the possibilities the new versions offer for projects of all descriptions and scale. When it comes to frameworks, Laravel and Laravel based CMS have captured the attention of the community for the moment and there is little indication that other frameworks would come up with a game changer!
If you think PHP would go in a different direction or would like to extend the discussion, please leave a comment below!
Ahmed was a PHP community expert at Cloudways - A Managed PHP Hosting Cloud Platform. He is a software engineer with extensive knowledge in PHP and SEO. He loves watching Game of Thrones is his free time. Follow Ahmed on Twitter to stay updated with his works. You can email him at email@example.com
Launch PHP websites without the worry of Server Management.
Pre-Installed Optimized Stack with Git, Composer & SSH