Le lundi 25 avril 2022, 18:19:33 CEST Rowan Tommins a écrit : > Look at how the untyped property behaves in this example: > https://3v4l.org/nClNs The property disappears from var_dump(), but is > not actually deleted from the object, as seen by it still being private > when assigned a new value. Given that we have the magic "uninitialized" > state, and we're proposing to make reading an unset property an error, > it would make more sense for it to show as '["untyped":"Foo":private] => > uninitialized(mixed)'
I second that it would make sense for an untyped property to behave the same as a typed one with type mixed. Getting a behavior change by adding a mixed typing to an untyped property is highly unexpected. Côme -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php