Adam Biro

Software Developer

Blogger

Photographer

Full Stack Developer

Photo Enthusiast

Web Developer

Adam Biro
Adam Biro

Software Developer

Blogger

Photographer

Full Stack Developer

Photo Enthusiast

Web Developer

Blog Post

[0] New Features Of the Main PHP Versions from 7.0 to 8.0.

March 26, 2022 IT, PHP, Programming
[0] New Features Of the Main PHP Versions from 7.0 to 8.0.

This post wants to go through PHP’s main features from 7.0 to 8.0 in a bullet point style with some links to more details. I am doing so because I would like to check the new features of PHP 8.0, and a list like this can be helpful for what functionalities I need to check. By the way, some of these new features extend a preexisting attribute that was introduced in the previous PHP versions. So this is the best time for me to check the past PHP features in a retrospected style.

What were the new Features of PHP 7.0?

  • https://www.tutorialspoint.com/php7/index.htm
  • New Features Included:
    1. Scalar type declarations
    2. Return type declarations
    3. Null coalescing operator
    4. Spaceship operator
    5. Constant arrays using define()
    6. Anonymous classes
    7. Unicode codepoint escape syntax
    8. Closure::call()
    9. Filtered unserialize()
    10. IntlChar
    11. Expectations
    12. Group use declarations
    13. Generator Return Expressions
    14. Generator delegation
    15. Integer division with intdiv()
    16. Session options
    17. preg_replace_callback_array()
    18. CSPRNG Functions

What were the new features of PHP 7.2?

Released: 30 Nov 2017

What are the new features of PHP 7.3?

Released: 06 Dec 2018

What are the new features of PHP 7.4?

Released: 28 Nov 2019

What are the new features of PHP 8.0?

Release: Nov 26 2020
  • New Features will include:
    • JIT Compiler
    • Union Types
    • The null safe operator
    • Named arguments
    • Attributes
    • Match expression
    • Constructor property promotion
    • New static return type
    • New mixed type
    • Throw expression
    • Inheritance with private methods
    • Weak maps
    • Allowing ::class on objects
    • Non-capturing catches
    • Trailing comma in parameter lists
    • New Stringable interface
    • Create DateTime objects from the interface
    • New:
      • str_contains() function
      • fdiv() function
      • str_starts_with() and str_ends_with() functions
      • get_debug_type() function
      • get_resource_id() function
    • Abstract methods in traits improvements 
    • Object implementation of token_get_all()
    • Variable syntax tweaks
    • Type annotations for internal functions
    • ext-json always available

Conclusion & Closing

As it looks on the list above, PHP has evolved a lot in the past years. Developers implemented many great features already in the version of 7.0, which was much faster than PHP 5.6 because of the new PHP – Next-Gen engine. In the following posts, I will focus on the new features of PHP 8.0.

Taggs: