On Fri, 26 Nov 2021 at 16:47, Sara Golemon <poll...@php.net> wrote:

> I'm not saying send PRs to fix them all...  Let's make PHP better,
> together.



On a similar theme, trying to avoid too much work for developers upgrading
to later versions of PHP.

Is there any value in me proposing an RFC to update *some* internal
functions so they can accept NULL?

I see developers using their framework of choice for GET/POST/COOKIE/etc
values (where they receive NULL to represent unset values), or simply doing
`$q = ($_GET['q'] ?? NULL)`, and other sources... where they will now get
deprecation messages whenever they use functions like `htmlspecialchars()`,
`trim()`, `strpos()`, `strtoupper()`, `strlen()`.

For example, a search page, where the search term is defined in the URL
(e.g. "/search/?q=abc"), and that value is shown on the page, often in an
`<input type="search" name="q" value="?" />` for the user to edit, and
sometimes repeated in the page content (where they may use `strtoupper()`
for styling purposes, instead of doing that via CSS `text-transform:
uppercase`).

Craig


https://externals.io/message/116076

Reply via email to