Hi!

> Scalar types declarations were introduced in PHP 7.0 but it was not
> possible to pass null as a default value to function/method. It was
> finally done by a small workaround described in documentation as "The
> declaration can be made to accept NULL values if the default value of
> the parameter is set to NULL".

If removing it would make scalar types work differently from non-scalar
types, it's not a good idea. Also, I don't see a reason why not have
both declarations mean nullable type - the intent is clear in both
cases, it's not like it can be confused with something else.

-- 
Stas Malyshev
smalys...@gmail.com

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to