On 28.02.2022 at 21:51, Craig Francis wrote:

> And after all of this, no-one has come up with a way to find or address
> this problem, e.g.
>
> <?php
>   $nullable = ($_GET['a'] ?? NULL);
>   echo htmlentities($nullable);
> ?>

<?php
function my_htmlentities(string|null $value) {
    return htmlentities($value ?? "");
}

$nullable = ($_GET['a'] ?? NULL);
echo my_htmlentities($nullable);
?>

The BC break doesn't appear to be that serious after all.

--
Christoph M. Becker

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

Reply via email to