> Le 21 nov. 2023 à 00:08, Rowan Tommins <rowan.coll...@gmail.com> a écrit :
>
> I've revised the RFC; it now proposes to keep the implicit "= null" for
> untyped properties, although I'm still interested in suggestions for other
> strategies around that.
Hi,
If you really want untyped property not being implicitly initialised to “null”
in the long term, here is my suggestion:
1. In 8.next, deprecate untyped property without initialiser, suggesting to add
an explicit “= null” (one deprecation notice per class definition containing at
least one untyped property without initialiser);
2. In 9.0, an untyped property without initialiser becomes a syntax error;
3. Later, reintroduce untyped property without initialiser with the new
semantics.
—Claude
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php