PHP 8.1 brings enums, read-only properties

PHP 8.1, billed as a major update to the popular scripting language for web development, has been released with capabilities ranging from enums and read-only properties to first-class callable syntax.PHP 8.1 was released on November 25. Source code and Windows binaries can be downloaded from php.net. [ Also on InfoWorld: Complexity is killing software developers ] Enums, or enumerations, allow developers to define a custom type that is limited to a discrete number of possible values. This can be helpful when defining a domain model by “making invalid states unrepresentable,” according to PHP documentation. In PHP, enum cases are valid objects that can be used anywhere an object may be used, including type checks.To read this article in full, please click here

Nov 30, -0001 - 00:00
 0
PHP 8.1 brings enums, read-only properties
Techatty All-in-1 Publishing
Techatty All-in-1 Publishing

PHP 8.1, billed as a major update to the popular scripting language for web development, has been released with capabilities ranging from enums and read-only properties to first-class callable syntax.

PHP 8.1 was released on November 25. Source code and Windows binaries can be downloaded from php.net.

Enums, or enumerations, allow developers to define a custom type that is limited to a discrete number of possible values. This can be helpful when defining a domain model by “making invalid states unrepresentable,” according to PHP documentation. In PHP, enum cases are valid objects that can be used anywhere an object may be used, including type checks.

To read this article in full, please click here

Talk to Techatty
Talk to Techatty
Techatty Connecting the world of tech differently! Read. Write. Learn. Thrive. Make an informed decision without distractions. We are building tech media and publication networks to connect YOU and everyone to reliable information, opportunities, and resources to achieve greater success.