In PHP 7.1 when the following function is called:
private function doStuff(?int $limit = 999) { }
with syntax like so:
doStuff(null);
the value of $limit
becomes null
. So I guess it can be said that the value of $limit
was explicitly set to null
.
Is there any way to overcome this? I.e. when a null value (i.e. the lack of a value) is encountered use the default, whether it is implicit or explicit?