On Our Radar: PHP 7 Controversy and Dependency Injection

Originally published at: http://www.sitepoint.com/radar-php-7-controversy-dependency-injection-troubles/
Over the past eight months, we’ve enjoyed bringing to you the latest and greatest updates from the world of web development. But we’ve also noticed that discussions among web professionals on our forums have not been receiving nearly enough exposure as they should.

To change things up a bit, we’re going to start bringing to you items and information from those discussions that have caught our attention. Sometimes these discussions will be useful and interesting, and sometimes they may be challenging or insightful. Either way, they’re likely to bring new information to light that you haven’t come across before, and will help to provide insight and perspective on topics you’re interested in.

So let’s get started!

PHP 7 Controversy

The PHP 7 Revolution article brought on a vast amount of discussion in our forums. The article covered information on how PHP is skipping 5.7 and moving directly to PHP 7, that the new version will give us return types, and that the removal of PHP4-style constructors is certainly going to be a controversial change. Tony Marstron controversially pleaded: please don’t break our language.

An excellent response from rrcatto:

“If a business needs to run a piece of code, to me this also implies actively maintaining it. … If the language changes, code must also change. That is the only dev paradigm that makes sense, because progress is a good thing and we should not hinder it.”

Continue reading this article on SitePoint

By the time common cheap hosting companies are adopting PHP 7, all relevant software, CMSes, frameworks, libraries will already have long since updated to new coding standards supported by PHP 7 anyway.

My point is, this is all "controversial" right this second, mainly because nobody anywhere actually has to adopt PHP 7. My prediction is, just like other versions of PHP, we won't even see PHP 7 as the common version for like 5 more years, by which all common libraries will have already been updated.
Heck, I still use extremely popular hosts which still support PHP 5.4 or older. Wordpress can still run on 5.2 though they recommend 5.4. By the time 7 becomes a requirement and is common, we'll already be talking about the controversies in PHP 11.

3 Likes

But PHP 7 is much faster, its on par with HHVM in terms of speed, which was what PHP 5 failed to offer as compared to PHP 4(PHP 5 was faster than PHP 4, but not magnitudes faster). This may make the transition shorter than you have envisioned.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.