If an object has an optional property, we can use ?? to avoid undefined property errors.

Here, we set a default value since the property $email is null by default.
Had we not used the Null Coalescing operator, we would get an Uncaught Error.

Accessing Nested Object Properties
If we’re certain that all objects exist, you can access nested properties using the object operator (->).

A null property would trigger a Warning.

In order to access nested PHP objects without triggering errors we can use the Null Coalescing operator.

Using Null Coalescing with Method Calls
Another use case for the Null Coalescing operator is with method calls.

If a method might return null, we can use ?? to set a default.
