Friday, 30 July 2021

How to Use Readonly Properties in PHP 8.1


PHP 8.1 adds support for a readonly modifier on class properties. A property that’s tagged in this way can only be set once. Trying to change a readonly property’s value after initialization will throw an error.

Read This Article on CloudSavvy IT ›



from How-To Geek https://ift.tt/2WBifCZ

No comments:

Post a Comment