Considering how frequently developers use this pattern:
$name = ($_POST['name'] ?? NULL);
Sometimes without really noticing, e.g.
I'm concerned it's going to make upgrading to 8.1 fairly annoying, as these
NULL values get passed to
I appreciate projects using
strict_types=1 will prefer this, but I
suspect all the deprecation notices will be annoying for the majority of
projects that don't.
And I appreciate that each instance is easy to fix, but there is a lot of
them out there (says he trying out a few projects on 8.1.0RC2, and being
glad that I'm not the one who needs to find and explicitly change all of
NULL values to an empty string).
As an aside, it is useful having
NULL to differentiate between a
GET/POST/etc value not being present, vs the value being explicitly set to
an empty string.
And anyone using Laravel, remember that
error_reporting(-1) is used
in HandleExceptions.php (to report all errors), and
E_DEPRECATED is handled
ErrorException, which is likely to result in 500 errors for you...
same with "Return type of X should either be compatible with X, or the
#[\ReturnTypeWillChange] attribute should be used to temporarily suppress
the notice" (lots of those, hopefully all will be fixed soon).