You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I thought so to, but in linked bug report there is a reference to #4974. The coded in this closed MR is still in de current codebase. That's why I'm wondering if it is a bug or not. It could also be that I misread the code ;)
If a typed property is in uninitialized state, either because it has not yet been initialized, or because it has been explicitly unset(), then reads from this property will invoke the __get() method if it exists, consistently with the behavior of ordinary properties.
But it looks like the behavior lead to confusion and was thus changed.
Description
The following code:
Resulted in this output:
But I expected this output instead:
There was an issue of this way back, https://bugs.php.net/bug.php?id=78904 and the changes are still present in de source code
php-src/Zend/zend_object_handlers.c
Line 608 in 8d84e44
Not sure if this is a bug, or my interpretation of the behaviour for unsetting a typed object property is wrong.
Thank you in advance for looking at this
PHP Version
Latest of PHP 7.4, PHP 8.0, PHP 8.1
Operating System
No response
The text was updated successfully, but these errors were encountered: