isset() On Uninitialized Properties¶
Typed properties cannot be read until they are written once. And many situations require to check if the property is set before writing it. Often, the type of the property is set to nullable, so it can have a default value of NULL, and then, be both checked and replaced.
isset() and the ?? operator are both able to check the existence of an uninitialized property without triggering the infamous fatal error. With that trick, it is possible to save a nullable type on the property, and help static analysis handling it cleanly.