<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Frank Lämmer</title>
    <description>The latest articles on DEV Community by Frank Lämmer (@franklaemmer).</description>
    <link>https://dev.to/franklaemmer</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F96242%2Fecaa87eb-d46f-4050-8b33-43885feb2393.jpeg</url>
      <title>DEV Community: Frank Lämmer</title>
      <link>https://dev.to/franklaemmer</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/franklaemmer"/>
    <language>en</language>
    <item>
      <title>On upcoming PHP deadlines</title>
      <dc:creator>Frank Lämmer</dc:creator>
      <pubDate>Thu, 20 Sep 2018 07:35:18 +0000</pubDate>
      <link>https://dev.to/franklaemmer/on-upcoming-php-deadlines-4ge6</link>
      <guid>https://dev.to/franklaemmer/on-upcoming-php-deadlines-4ge6</guid>
      <description>&lt;p&gt;&lt;strong&gt;The end is near! Only little time until the end of life!&lt;/strong&gt; At least for PHP 5.6 and PHP 7.0. Why update? Why is there so much old PHP out there? How to establish an up-to-date mindset.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why upgrade to PHP 7.2 anyway?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;It's about time.&lt;/strong&gt; "PHP 5.6" is the last 5 version around and there will be no security patches from December 2018 on. Any new vulnerabilities will not get fixed any more. The same applies to the initial PHP 7 release, version 7.0. It was released in December 2015. The current version is PHP 7.2 and PHP 7.3 is approaching next. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.fortrabbit.com%2Fdist%2Fimg%2Fphp-version-deadline-on-php-net.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.fortrabbit.com%2Fdist%2Fimg%2Fphp-version-deadline-on-php-net.png" alt="php deadlines approaching"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;See the &lt;a href="http://php.net/supported-versions.php" rel="noopener noreferrer"&gt;officially supported PHP versions and there lifespans here&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  How much old PHP is still around?
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.fortrabbit.com%2Fdist%2Fimg%2Fphp-usage-according-to-w3techs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.fortrabbit.com%2Fdist%2Fimg%2Fphp-usage-according-to-w3techs.png" alt="php usage according to w3techs"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As of September 2018: PHP 5 is still the most used version of PHP. According on who you are asking, you will get different answers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;~80% old PHP&lt;/strong&gt; according to &lt;a href="https://w3techs.com/technologies/details/pl-php/all/all" rel="noopener noreferrer"&gt;W3Techs&lt;/a&gt; (PHP 7 also includes the deprecated PHP 7.0)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;~66% old PHP&lt;/strong&gt; according to &lt;a href="https://wordpress.org/about/stats/" rel="noopener noreferrer"&gt;WordPress&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;~21% old PHP&lt;/strong&gt; according to &lt;a href="https://seld.be/notes/php-versions-stats-2018-1-edition" rel="noopener noreferrer"&gt;Composer&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why the differences? Well, I believe &lt;strong&gt;W3Tech&lt;/strong&gt; is just crawling the web sniffing the &lt;code&gt;X-Powered-By&lt;/code&gt; header to get the version in use today. That includes all the public IPs with all the neglected websites out there. As this gives potential hackers information about the PHP version, it's common practice to suppress or fake this header, so maybe take this number with an extra grain of salt. &lt;strong&gt;WordPress&lt;/strong&gt; is luckily a little ahead, as it is an active community of "web designers", with a big stake in the United States. And of course, Jordi with &lt;strong&gt;Composer&lt;/strong&gt; is ahead, as those PHPeople are mostly "web developers" who care more about such things.&lt;/p&gt;

&lt;h3&gt;
  
  
  Who is to blame for all the old PHP?
&lt;/h3&gt;

&lt;p&gt;We started fortrabbit, around 5 years ago, because we were thrilled by the new PHProfessionality. Composer, Laravel — for us PHP really made the switch to a modern programming language. Still PHP has a bad rep for being the Pretty Home Pages language — and that is also still true. PHP was and still is (beside JavaScript) the first web native language to pick to create home pages. And many of those websites are still around. It's all those tiny businesses and their &lt;strong&gt;semi professional web designers&lt;/strong&gt;. When you receive $200 to build a website for a restaurant, you are not likely to maintain it for the next 10 years.&lt;/p&gt;

&lt;p&gt;And it's the &lt;strong&gt;mass of shady shared hosting providers&lt;/strong&gt; who are keeping the clients locked-in in long term contracts and outdated versions. I can imagine that half of those PHP 5.6 websites could actually be switched off by now. But that's not the interest of the hosting providers, they are more interested in keeping them around.&lt;/p&gt;

&lt;h3&gt;
  
  
  Our conflict of interests
&lt;/h3&gt;

&lt;p&gt;It's tricky. Even with us — fancy PHP cloud hosting (fortrabbit) — around a quarter of Apps are still running on PHP 7.0 and PHP 5.6. Luckily it's more PHP 7.0 and less PHP 5.6 which will make the transition less painful. Still it's a few hundred Apps and that's some good revenue for us. Most of those Apps are old of course, they have a life time of at least 14 months and sometimes even much or more. So those Apps are already older than the average App here — more likely to churn soon. We expect to find lot's of neglected projects their owners forgot about in there. Now, when we will start to inform the owners about upcoming changes, chances are that many of those projects will just be killed. Either the projects are not needed, or there will be no budget for migration efforts. PHPeople will be like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Oh, that shit is still around? I need to take care of this now? Oh, and I haven't integrated those GDPR changes. I can cancel this right away. Cool! Let's do this instead."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We will loose a good number of Apps. As a business that's of course not in our interest. &lt;/p&gt;

&lt;h3&gt;
  
  
  Or shall we keep all the old PHP?
&lt;/h3&gt;

&lt;p&gt;We have discussed ways to deal with the situation. One idea was to keep those Apps still around, on unsecured PHP versions. Our fellow colleagues over at Platform.sh are following such an approach: Asking to upgrade but still keeping Apps on old PHP versions around - see &lt;a href="https://platform.sh/blog/its-july-2018-do-you-know-what-your-php-is" rel="noopener noreferrer"&gt;their blog post&lt;/a&gt;. The argument here is, that we should support the clients preferences as much as we can. This is technically possible here as well. We could accept the risk of someone leveraging not fixed vulnerabilities to break in, only causing some local damage. &lt;strong&gt;But NO, we won't do that!&lt;/strong&gt; Still this could cause our IP ranges or App URLs to be down-ranked or included into SPAM blacklists. We also want our client base to be fresh, agile and alive. &lt;/p&gt;

&lt;h3&gt;
  
  
  What to do about all the old PHP?
&lt;/h3&gt;

&lt;p&gt;What ever the real number of old PHP installations in the whole internet will be, there soon will be tens of thousands of outdated and unprotected PHP servers out there waiting for hackers to take them over. Maybe we should all gather together and raise awareness for the situation so that more PHPeople wake up and update? What about a hashtag like &lt;strong&gt;&lt;code&gt;#uPHPgraded&lt;/code&gt;&lt;/strong&gt;?&lt;/p&gt;

&lt;p&gt;Or maybe, even better, that's a call to establish new business models? Imagine, what would you do with that army of zombie servers? Bitcoin mining or even making Obama president again?&lt;/p&gt;

&lt;h2 id="establish-an-up-to-date-mindset"&gt;Establish an up-to-date mindset!&lt;/h2&gt;

&lt;p&gt;Keeping your own code and the underlying software dependencies up-to-date is more than just a good practice, it's a requirement. The &lt;strong&gt;up-to-date mindset&lt;/strong&gt; requires some thinking ahead and discipline. &lt;a href="https://en.wikipedia.org/wiki/Technical_debt" rel="noopener noreferrer"&gt;Technical debt&lt;/a&gt; is the keyword here. Consider upfront that all the code your are having out there, will constantly need some attention and time.&lt;/p&gt;

&lt;p&gt;It's easier when you are code maintainer and business owner, like with a start-up or as a freelancer on your own projects. It's more complicated in bigger structures and in client-agency relationships. Make maintenance an topic early on, include it in your estimates. &lt;strong&gt;Raise awareness on the importance to keep your software up-to-date.&lt;/strong&gt; Reserve a time budget for that upfront.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;We are very happy to see the PHP language under heavy development coming closer to shorter release cycles and even breaking some old habits. It's alive. Let's embrace change and move forward.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;This was &lt;a href="https://blog.fortrabbit.com/on-php-deadlines" rel="noopener noreferrer"&gt;first published in the fortrabbit blog&lt;/a&gt; and has been slightly edited for the dev.to community. I think we need to raise awareness in the PHP community on that.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>php</category>
      <category>uphpgraded</category>
      <category>composer</category>
      <category>wordpress</category>
    </item>
  </channel>
</rss>
