-
Notifications
You must be signed in to change notification settings - Fork 8k
Open
Description
Description
There is a difference between uninitialized and unset property when magic method like __get() is defined. The need of these two states was discussed in #9389.
Currently there is no way to detect if property is just uninitialized or also unset, so from the observable state, it is impossible to tell the property behaviour of a given object.
repro: https://3v4l.org/lDeXi
This is a feature request to add ReflectionProperty::isUnset() method.
An alternative would be to update property_exists() function behaviour - https://www.php.net/manual/en/function.property-exists.php#116824 - which does not account for unset property since it was introduced.