Am 08-Feb-2023 15:59:02 +0100 schrieb tekiela...@gmail.com: > When using typed properties, the language cannot use NULL as the default > anymore because the type might not allow NULL, e.g public string $name > allows only string values.
Would it make sense to make "null" the default value for nullable properties at least? So that one could write class Test { public ?string $name; } var_dump((new Test())->name); // null Best regards Christian -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php