Are you still using PHP 5.x? Why?

gerryvz

Well-known member
I am still on 5.x. What kind of page load improvement can you expect by switching to 7.x?
php is a good idea to make sure you're upgraded to 7.x. A lot of security and performance improvements. I'm on 7.3.13 and will be migrating to 7.4 soon. The main thing I'm concerned about is 7.4 compatiblity with my add-ons, but from the research I've done it should be pretty seamless. I've got 7.4 all loaded and update on my system -- just need to flip it over from 7.3.

XF uses a lot of php add-ons (particularly associated to apache), so if/when you do migrate to 7.x, be sure that you download and install all of the associated add-ons.
 

Jon12345

Active member
I am using litespeed web server. Does that still use php 7.x or does it have its own version and so therefore I don't need to upgrade?
 

Jon12345

Active member
Ok, I used MultiPHP Manager in CPanel and it was super-easy to change PHP versions. Checked a quick YouTube video first to make sure I don't mess things up. Result? Faster load times. Yay!
 

Chris D

XenForo developer
Staff member
PHP 7.4 adoption isn’t particularly noteworthy at the moment. But that’s expected because it’s still relatively new. Many people understandably hold off a few releases before upgrading.
 

eva2000

Well-known member
PHP 7.4 adoption isn’t particularly noteworthy at the moment. But that’s expected because it’s still relatively new. Many people understandably hold off a few releases before upgrading.
FYI, there's a potential bug in PHP 7.4.2 https://bugs.php.net/bug.php?id=79174 with scheduled fix in next PHP 7.4.3 release which can cause web apps like wordpress to prevent user logins.

For my Centmin Mod users, I backported PHP 7.4.3 fix into PHP 7.4.2 routines https://community.centminmod.com/th...ed-php-7-1-33-7-0-33-5-6-40.19065/#post-81237 :)

non-Centmin Mod folks, would need to either wait for PHP 7.4.3 release or downgrade to insecure PHP 7.4.1 - as PHP 7.4.2 is a security fix release or downgrade to PHP 7.3.14
 

gerryvz

Well-known member
When is 7.4.3 slated for release? Appears that it will be released by the end of February, 2020.
 

eva2000

Well-known member
Yeah they fixed it quickly just PHP 7.4.3 isn't due for official release until end of the month. I couldn't wait so backported fix to my PHP 7.4.2 builds :)
 

TLDR

Active member
I try to use at least PHP 7.0. Aside from mysql_* functions that got removed (but can be resurrected with a wrapper to mysqli), the compatibility-breaking changes are fairly minor, so from what I experienced, if it runs on 5.6, it will also on 7.0.

However, I manage countless websites on 8-or-so servers and we have all sorts of software and plugins and sometimes, installing, say PHP 5.4, is the lesser evil ("for now") than dealing with every line of code that might be broken.

That said, my new year resolution is to make our sites fit for PHP 7.4.
But honestly, not because I plan to utilize all the fancy new functions. Rather because it's getting more and more complicated to have old versions of PHP installed on the server. And well, the day will come...
 

Chris D

XenForo developer
Staff member
Here's the current chart:

1580812272569.png

The best thing to report really is that nearly 85% of customers are now using PHP 7.x which certainly ratifies that our decision to leave PHP 5.x behind with XF 2.2 is the right one.

Less than two years ago only ~55% of customers were using PHP 7.x.
 

Chris D

XenForo developer
Staff member
That’s clearly leaving a not-insignificant number of customers behind. I appreciate that it will make many upgrade but we don’t want to do it arbitrarily. PHP 5-7 is a significant upgrade in terms of performance, and additional code features we can start using.

Certainly if the trend continues then 7.1 for 2.3 is a reasonable target but I think we’d rather do it in those kinds of incremental steps than jumping too far ahead.
 

Jake B.

Well-known member
Certainly if the trend continues then 7.1 for 2.3 is a reasonable target but I think we’d rather do it in those kinds of incremental steps than jumping too far ahead.
7.1 will allow you to use nullable return type definitions ;)
 
  • Like
Reactions: Xon
Top