Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129663 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 837E71A00BC for ; Fri, 19 Dec 2025 23:28:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1766186925; bh=wu7wKGdiH1MfgtQzc8LO0Cx2TFSAhP1di+9oTBClHD8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Qx7YHwgH12obi+xSYBnpJ33zUhrbxacAJ/qZbFV9kwGShwJ+eXiWYfJrzsXf+zj7b 2mk7xoxopHjy7jB+N6zIltiKRhlrtwi44lRQplSX9PJyf69H3twyWZwzjmq88LuCcg S5JcSNBLx68RzjRE1fXTh1iXjuALs2Lx6BY02DsLuWdg1WIc1nprIOKtyzA/U8UNOs 9OZ4iPtMwZXyAKyZP9XQ4ASI/76jPnD34P3g5mxdTwJOciVRUYdGXFNmb5m9EaJTyP QUVOfzoweo7gDmsBWqaeAluMF7XVlEGuDC/Kk1jOEhP7V42ITKN7N3fZyfK1mgyrWD J1wi+69uGYzdg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 02DB81801E3 for ; Fri, 19 Dec 2025 23:28:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, T_SPF_TEMPERROR autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 19 Dec 2025 23:28:36 +0000 (UTC) Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-64b9b0b4d5dso2051272a12.1 for ; Fri, 19 Dec 2025 15:28:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766186910; x=1766791710; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=mFkNq9lTrkqnPwqfzcfAPRP5d91RhORIPJDbH0QWGG8=; b=QK+G6TKeG+24DD6oSxOYdpZTr0ktJ35UPrBEAbOZVxEqR7IUVndw2zktMc+s1XO4oq K87M7BQ+r97QOcZI22+SDYT4hDfmOYbudgpB15ou8hx0juIkRhF4MawzXrywB5fY6kL8 iRlU3oAMezY96FQg6KrcG1skEz7MoWYRjMysioOK/aLRanwVUTA13Ft718ZfpiDxyhqK cQ8tDyvj2y3ynnB85+KK45keqvxktX6nX3ZgIgcmRh5sE08Vi8GD4krVSoWtZJqDv4y5 VERauyTUMocgJZzWxlr5VubTi3kiqP7IK6hiyVifIoR/VKmW4Ecy9lKvtSx2P/f/oDH4 YD8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766186910; x=1766791710; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=mFkNq9lTrkqnPwqfzcfAPRP5d91RhORIPJDbH0QWGG8=; b=PfliFZQ3l0oqHLEt8fOEKSaMDj/Ui+9uEGiKxU/nJDdff9tnbsq/mfYcpask118W+2 DULFm/t662dhB3EC0IGIY/WddUio7eU759EHfzeq6A8KkFAvX8NmuwkVwyO5BmN/MFoA Vcsrr3qVIT82fTtjzu6saXKo8VAc1YftnAdVHA5+hrlsGYJRdhSMs7Xqgyg/lerKojAO mkt5RC3HVpNcygcGwZQJ/wFM8qxKLeNCroCpmLnD51f60hY5QgjjW6ILX6fq2tEyA5sI RMeEQ/5LUX3Bi1IlguhTE7BU5E/3LSdABK5jfdGAQRG4ABp6fUwkWlTiT5Fuh7JZw7uW ol3g== X-Forwarded-Encrypted: i=1; AJvYcCXubW+w10jNF71WYTDnxZs6ztkSwI7dcbYT0eAQcG464DYrlERgYIRwy+rFa2SyfagkqAuCW3IclmM=@lists.php.net X-Gm-Message-State: AOJu0Yy2vSxamN5BYTRq+WTE3t57y0G50+lOoxMvqrGOgzP4k0hDb46/ SnKKBMjkzajEwQlxfQidQqtz4F6FN6gMdM2/nO5W7wM+lJj8efGiwtNVGfiZVEzd1ERaY2vyCM5 jg+iL0tuT0/QvIm8fGeY6D51Vwwd5ZGk= X-Gm-Gg: AY/fxX5sz8SmjQe7cfYiTHOXg5pKvnOiQUfPB2Gwvgo1y9jf6eebiVVDBTSqV/2niYf w8Ia+heyfb55CTc1uJAML0R3gLXxu5y4TgDSAMM2CQqD0Lsa8idFuB5ZYaYBKMp4IerotZ3vhGO n0DbZaaQX0qSvRJrxo0vRH2qGoMCl5m7TBBS340nkhyDXbRRe8eQNr9OWyv6CR6UjE/HxpSdPZI jncX3OhbxR2/guadUsxZljC/BADQ9c710uS4LjVyq6OqaAtawh03ynNRsP7YAS4TfmO1hDTa7kK +mMNyueC X-Google-Smtp-Source: AGHT+IFQy7HLeTsHiENVAAgwoCqfksY4nQSIwGxC9b7FhN91LnN69HwkZM1H/dm12u+GkgoOAm7iqA4mUWi4bRwJclg= X-Received: by 2002:a05:6402:254f:b0:647:7a1e:665 with SMTP id 4fb4d7f45d1cf-64b8e937d8emr3793815a12.4.1766186905759; Fri, 19 Dec 2025 15:28:25 -0800 (PST) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: <23051439-6f0d-4175-b632-3b943582bfe0@beccati.com> In-Reply-To: Date: Sat, 20 Dec 2025 09:28:14 +1000 X-Gm-Features: AQt7F2q3sR2N2E0uCnYGmK9Ls2TOIb7NarnLQ9Tz4FeH2FWGMf-TO25pIKgBgNw Message-ID: Subject: Re: [PHP-DEV] [RFC] New function mysqli_quote_string To: Hans Henrik Bergan Cc: Kamil Tekiela , Matteo Beccati , PHP internals Content-Type: multipart/alternative; boundary="0000000000001ff4c10646566f06" From: mickmackusa@gmail.com (mickmackusa) --0000000000001ff4c10646566f06 Content-Type: text/plain; charset="UTF-8" > 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 > --0000000000001ff4c10646566f06 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

btw pg_escape_lit= eral is mis-named. it does not escape - it quotes.=C2=A0
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=C2=A0possible to make a binary-safe quote() = function

IMO=C2=A0 pg_escape_literal should be renamed pg_quote_literal.

A deviation, b= ut 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 s= trings! I dream of a future with a robust preg_escape() in it.

mickmackusa
--0000000000001ff4c10646566f06--