PHP 8 New Feature – Nullsafe Operator for Beginners
Null-safe operator is a new syntax in PHP 8.0, that provides optional chaining feature to PHP. In PHP, when working with objects, sometimes a property or method may not exist (it can be null).Normally, checking this requires multiple if conditions to avoid errors. PHP 8 introduced the Nullsafe Operator (?->) to make this easy. Old Way (Before … Read more