23 Comments

  1. David Dashifen Kees
    · Reply

    I am probably unreasonably excited for typed properties. I’m just hoping I can jump to 7.4 ASAP both for professional and hobby projects (the latter being more likely).

    Report

  2. sky
    · Reply

    !fn(way)

    Report

  3. Mobeen Abdullah
    · Reply

    Finally, I can now answer my .NET developer colleagues who always taunt me for not having types properties lol

    Report

  4. Luis Eduardo Braschi
    · Reply

    I can’t see the examples properly on my phone. :/

    Report

  5. Lenin Zapata
    · Reply

    I made a plugin fully compatible with PHP 7.3, but the clients immediately wanted to kill me because their hosting still has them with PHP 5.6 and they didn’t want to update the versions. It is very complicated to make a plugin with the PHP 7.4 version when the plugin is already on the market. But if the plugin is new you can send a warning that is plugin only works with PHP7.3 or higher.

    Report

  6. John Rodderick
    · Reply

    Let it die.

    Report

  7. Rhys C
    · Reply

    Great roundup, I didnt even know about the null coalesing in php 7, been writing a lot of unecessary code dangit.

    How will some of these features work when running an older version of php, will they just blow up (cause errors)?

    Report

  8. Anh Tran
    · Reply

    Null coalescing assignment operator is the thing I like most. Writing ?? is much better than isset(). Sadly it’s not available for PHP < 7.

    Report

  9. Rajeev
    · Reply

    Short closures for cleaner one-liner functions in 7.4

    Report

  10. Pradeep Singh
    · Reply

    Hello,

    I am not a developer, so I want to know that can I upgrade my website with PHP 7.4

    I don’t want any issue with my website

    Thanks

    Report

    • Justin Tadlock
      · Reply

      PHP 7.4 isn’t available to the general public yet. It’ll also need to be made available by your Web host. Depending on who that is or what your hosting environment looks like, it could be months or longer before you can upgrade your PHP version.

      To get ahead, you might want to check out the PHP Compatibility Checker plugin, which will let you know what versions of PHP your themes and plugins are compatible with. Please make sure to read its notes and disclaimers about how the plugin works.

      Report

    • wanker
      · Reply

      not a good idea. besides this is your host’s job so don’t worry about it.

      Report

  11. Gary Jones
    · Reply

    Attempting to assign the wrong data type will result in a fatal error.

    …only if `strict_types` are declared, otherwise the PHP will coerce the value as best it can.

    Report

  12. Ryan Hellyer
    · Reply

    Thanks for the rundown on the latest and greatest PHP changes :)

    I wish people wouldn’t use ternary operators even for single levels. I find them terribly confusing and always have to look at them a few times to work out what it’s actually doing. I shudder to think of how confusing a nested one will be :/

    Report

    • Knut Sparhell
      · Reply

      I love them. It depends on what you are used to and your code editor, i guess.

      Very useful to ensure edge cases end up with a valid type of variable. No need for a multi-statemnet if block just for that. I often find those confusing. Full if blocks is best for the main logic.

      Report

Leave a Reply

Your email address will not be published. Required fields are marked *

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

%d bloggers like this: