Thursday, June 22, 2023

PHP Latest Keywords

 PHP   Latest   Keywords

  • match
  • readonly
  • fn
  • yield from

These keywords were introduced in PHP 8.0, and they provide new features and functionality.

  • match is a new control flow statement that can be used to match values against patterns.
  • readonly is a new modifier that can be used to declare a property or variable as readonly.
  • fn is a new keyword that can be used to create anonymous functions.
  • yield from is a new keyword that can be used to yield multiple values from a generator function.

These keywords are still under development, and they may be subject to change in future versions of PHP. However, they offer a lot of potential for new and innovative ways to write PHP code.

Here is a table that summarizes the latest PHP keywords:

KeywordDescription
matchA new control flow statement that can be used to match values against patterns.
readonlyA new modifier that can be used to declare a property or variable as readonly.
fnA new keyword that can be used to create anonymous functions.
yield fromA new keyword that can be used to yield multiple values from a generator function.

No comments:

eLearning and Blackboard

  IT professional, U bring a unique set of skills and expertise that can greatly contribute to the successful development and implementati...