On Tue, 1 Mar 2022 at 13:06, Christian Schneider <cschn...@cschneid.com>
wrote:

> The other way of making internal functions behave like user land functions
> would be to change the definition of the internal function to
>         function htmlentities(?string $value) { ... }
> and casting it to string internally which would make the
> definition/documentation/behavior consistent while staying backward
> compatible.
>


True, that is an option, and that's where I started... but I changed my
mind, because developers who use `strict_types=1` can use this extra meta
data (the type check) to verify their code is working as expected.

In other words, someone checking types can see NULL being passed to
functions like escapeshellarg() as an error, and I do not want to break
that for them.

Craig

Reply via email to