Open
Description
Description
demo: https://3v4l.org/lDeXi
Currently, typed property can be "almost uninitialized" by unset()
.
But doing such uninitialization unsets the property and allows magic __get to kick in. This is expected and discussed in #9021.
Because of this, non-readonly typed property cannot be uninitialized properly. This is an issue in cases when the same object is to be restored, reused or cleaned.
To allow an object state to be restored/uninitialized correctly, I propose to add ReflectionProperty::setUninitialized()
method and backport it into PHP 8.0 and above.