Re: [RFC] New function mysqli_quote_string
| From: | mickmackusa | Date: | Fri, 19 Dec 2025 23:28:14 +0000 |
| Subject: | Re: [RFC] New function mysqli_quote_string | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-129663@lists.php.net to get a copy of this message | ||
> btw pg_escape_literal is mis-named. it does not escape - it quotes.
> And there is an important difference between escaping and quoting,
> at least for SQLite, it is impossible to make a binary-safe escape()
> function,
> but it's fully possible to make a binary-safe quote() function
> (see https://github.com/php/php-src/pull/13972 )
>
> IMO pg_escape_literal should be renamed pg_quote_literal.
>
A deviation, but this triggers my naming concern with preg_quote(). It
doesn't quote anything, it escapes things; and it should be able to process
an array of strings! I dream of a future with a robust preg_escape() in it.
mickmackusa
>