Hi, On Thu, Mar 17, 2016 at 1:02 PM, Matt Prelude <[email protected]> wrote:
I'd support borrowing the "?" nullable annotation from HackLang for
> people who want a less strict behavior:
>
> public ?string $name;
>
> This means that $name can either be a string or the NULL value.
>
Or, do it like with parameter type hinting:
public string $name = null;
Although I'm all for limiting NULL to only being the default value:
$this->name = null; // this should throw a TypeError
Cheers,
Andrey.
