Re: Nullable types and strict type-hinting with default null value

From: Date: Thu, 23 Feb 2017 09:15:27 +0000
Subject: Re: Nullable types and strict type-hinting with default null value
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-98345@lists.php.net to get a copy of this message
Indeed, it's far too early to think about forcing people to change all their code to the ? notation. I'm also not convinced of the value even once that's established; it's not like "Foo $foo = null" can ever mean *something different* from "?Foo $foo = null", it would just be an error. Maybe in 10 years' time we'll have another bonfire of unused features, and this might be one, but it's not something we can plan for right now.
And what about situation when someone is forcing declare(strict_types=1)? I think, it's really a good place to force proper types. Including nulls.

« previous php.internals (#98345) next »