Why would you still be on PHP 5.2?

For Autoptimize 2.0.1 I declared a pretty complex regex to extract font-face’s from CSS using the nowdoc-syntax which is supported from PHP 5.3 onwards. Taking into account that the first PHP 5.2 release was over 9 years ago and support ended with the release of 5.2.17, over 5 years ago I assumed using a nowdoc would not be a problem for anyone. How naive I was; several people contacted me with this ugly error-message PHP 5.2 throws;

Parse error: syntax error, unexpected T_SL in /wp-content/plugins/autoptimize/classes/autoptimizeStyles.php on line 396

There is a workaround and even a more fundamental fix for that already, but who would still want to run PHP 5.2, which has this huge list of security issues? Moreover PHP 5.5 and 5.6 seem approximately twice as fast as 5.2 according to these test results and PHP 7.0 is even over three times as fast as 5.2! And still almost 9% of all WordPress sites are running on that old version (so I could have known this was coming really, bugger).
I you are one of those, do urge your hosting company to urgently provide you with an upgrade path to PHP 5.6 (or even 7.0)!

7 thoughts on “Why would you still be on PHP 5.2?”

  1. Haha..!!! I can understand your annoyance…!!! I face the same thing many a times. As far as I am concerned, both the parties are at fault, the users as well as the hosting service providers. Both the users and service providers fail to do the basic housekeeping, i.e; keeping themselves updated. A simple look at the system requirement is enough to understand what needs to be done (https://wordpress.org/about/requirements/).

    Reply
  2. Hi there!
    Parse error seems to be common in 5.2. I noticed similar issue on a friend website. He had hosted his WordPress blog at Bluehost.
    Concerning security and features, I would highly recommend to everybody that you must switch to at least PHP 5.6 If you are hosted at 5.2 or 5.4 it’s huge risk of security and lack of features.
    I’m happy with PHP 7.0 so far very amazing performance. It’s blessing of AO, that my all pages load
    between 0.5 to 3 seconds only. Call me crazy, but, still I’m hungry to unlock more speed.
    Looking forward for amazing performance in HHVM
    Regards,
    Gulshan

    Reply

Leave a Reply to All Bangla News Paper Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.