Announcement

Collapse
No announcement yet.

PHP 7.2 Provides Modest Performance Boost Over PHP 7.1

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PHP 7.2 Provides Modest Performance Boost Over PHP 7.1

    Phoronix: PHP 7.2 Provides Modest Performance Boost Over PHP 7.1

    Last week marked the official release of PHP 7.2 that besides offering new features does provide minor performance boosts to PHP7...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    Meanwhile, we're still running PHP 5.x on some servers and thus need to maintain compatibility with that version..

    IIRC anonymous functions were among the things which don't work, which is just sad.

    Comment


    • #3
      As someone who used to write a lot of PHP (freelancing during Uni, 3+ years ago), I love reading about these new performance increases and features in PHP 7.0, 7.1, and now 7.2, but I continue to ask myself, "who is using these versions?".

      I maintain a couple of websites for some old clients, their sites are hosted on the "shared hosting" style servers which have CPanel interfaces. Most hosts are limited to a fixed version of PHP (usually 5.4.x) but some have drop-down list to select the PHP version you want, and the list will contain v5.3.x, v5.4.x or v5.6.x. These hosting companies have zero reason to offer anything more than that, and always I target the site's code to be compatible with the highest PHP version offered.

      Even if you are self-hosting (VPS, cloud, co-location, on-site, etc) and are free to install whatever version of PHP you want, I believe the majority of existing PHP code is written to be used on v5.4.x or v5.6.x and is likely incompatible with v7+. Is it worth modifying your exisitng code to upgrade to the latest and greatest PHP? Ask a software engineer, they will say yes, but ask anyone else in the company and they will say no way.

      And how about new projects? Are people honestly actually choosing PHP for the language of a new web project these days? I think dotNet, Python, and Ruby are more common for new projects (but I might be wrong).

      Comment


      • #4
        Originally posted by FishPls View Post
        Meanwhile, we're still running PHP 5.x on some servers and thus need to maintain compatibility with that version..

        IIRC anonymous functions were among the things which don't work, which is just sad.
        I honestly feel sorry for you.

        I think also think that the mcrypt deprecation is going to affect adoption of 7.2 in the near term - with some very good long term security enhancements

        Comment


        • #5
          Originally posted by flubba86 View Post
          Even if you are self-hosting (VPS, cloud, co-location, on-site, etc) and are free to install whatever version of PHP you want, I believe the majority of existing PHP code is written to be used on v5.4.x or v5.6.x and is likely incompatible with v7+.
          Nearly all open source frameworks (such as Symfony) and PHP-based projects (such as October, Flarum or even WordPress) work with the newest PHP versions just fine.

          Originally posted by flubba86 View Post
          And how about new projects? Are people honestly actually choosing PHP for the language of a new web project these days? I think dotNet, Python, and Ruby are more common for new projects (but I might be wrong).
          PHP is still a very competitive language for new projects: it's fast for an interpreted language (usually faster than Python or Ruby, the latter not being a very popular choice these days). Of course, there's lots of alternatives (such as Go or even Rust) but these come at a cost: their documentation is much more scarce, and their community is smaller, making it harder to get support. Not to mention PHP has many high-quality frameworks (large and small) out there, which is not always the case of some other languages.

          Comment


          • #6
            Originally posted by Calinou View Post
            Not to mention PHP has many high-quality frameworks (large and small) out there, which is not always the case of some other languages.
            And not to mention WordPress, which powers nearly 30% of the whole web.

            Comment


            • #7
              Still doesnt compile with LTO

              Comment


              • #8
                If you have a good design with PHP you can serve pages instantly. Unfortunately most php proj3ctw are utter trash even professional ecommerce systems such as magento.

                Comment


                • #9
                  Originally posted by flubba86 View Post
                  As someone who used to write a lot of PHP (freelancing during Uni, 3+ years ago), I love reading about these new performance increases and features in PHP 7.0, 7.1, and now 7.2, but I continue to ask myself, "who is using these versions?".

                  I maintain a couple of websites for some old clients, their sites are hosted on the "shared hosting" style servers which have CPanel interfaces. Most hosts are limited to a fixed version of PHP (usually 5.4.x) but some have drop-down list to select the PHP version you want, and the list will contain v5.3.x, v5.4.x or v5.6.x. These hosting companies have zero reason to offer anything more than that, and always I target the site's code to be compatible with the highest PHP version offered.

                  Even if you are self-hosting (VPS, cloud, co-location, on-site, etc) and are free to install whatever version of PHP you want, I believe the majority of existing PHP code is written to be used on v5.4.x or v5.6.x and is likely incompatible with v7+. Is it worth modifying your exisitng code to upgrade to the latest and greatest PHP? Ask a software engineer, they will say yes, but ask anyone else in the company and they will say no way.

                  And how about new projects? Are people honestly actually choosing PHP for the language of a new web project these days? I think dotNet, Python, and Ruby are more common for new projects (but I might be wrong).
                  Major frameworks I am familiar with work on PHP 7 and we use it in production via platformsh.

                  No incentive? How about massively faster page loads. Half the load times in many instances. Most PHP 5.x code is compatible with 7.x. You have to either a) be doing really ugly stuff, or b) using stuff that was deprecated half a decade ago.

                  With the Composer resurgence there is plenty of growth in PHP land.

                  Comment


                  • #10
                    Originally posted by cj.wijtmans View Post
                    If you have a good design with PHP you can serve pages instantly. Unfortunately most php proj3ctw are utter trash even professional ecommerce systems such as magento.
                    Agree, except that regarding Magento the design is almost ok, the issue are the crappy extension sold on the market, most of them has poor code.
                    Also, most of people that complain about it they also try to run magento on VPS:
                    - Magento do an heavy use of MySQL so you need Ram and SSD ( full page cache and flat table )
                    a 10$ host usually do not suit a Magento store ( also depends on the catalog dimension, number of stores, customer groups )
                    Last edited by postadelmaga; 07 December 2017, 01:42 PM.

                    Comment

                    Working...
                    X