Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113315 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 73778 invoked from network); 27 Feb 2021 19:04:36 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 27 Feb 2021 19:04:36 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 152C91804D0 for ; Sat, 27 Feb 2021 10:54:10 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 27 Feb 2021 10:54:09 -0800 (PST) Received: by mail-ed1-f45.google.com with SMTP id b13so6002990edx.1 for ; Sat, 27 Feb 2021 10:54:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+sy3zFsVmuZvMOY7fK3US+tQlOXrVQ5rdmenqudQiyo=; b=QKuDVg9iOYsOkfvaWmYq5dDJVbRe8WoSiEywJuVoxXYz0Y8WZjzIjSZ6j/xYGiyS2g OQFt77zwhmFLRp9QOdQ1sjNicaAwXmlV1favNMoPdKPbGRiUeWfn+s+xRVCeqk3okSpW qRIjcGM3YoaKpWAC6DBhT7DVGR/680djddQhJ+hg6+kO8kz8hBVnpUYMBsJODnUnuVtr 1ppoRC1uTouEaSYbHIc1K94SxsX6LBFkXEIme0RMqF3lCwt0j3Kxc1LgOdtwK9hD5BDN Z6/X57O3Fo05jhVeW5S/ZUEId8RA6h07V52sRTe54U+LAEOCduDUOC9e0Ic2eBmrSwaG zFqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+sy3zFsVmuZvMOY7fK3US+tQlOXrVQ5rdmenqudQiyo=; b=AxDkDj/VEJwxkTuU/ymOUzBT38xIKKw4DdzDbTYVc8O3bxoM5XVDWKV0Z1IvOyeT0p phqotwInqm3Odbr5NmysAh6urGQ5JxQ2a7X0BhQ6Rys2u9Nw1S9cImgdG8yCKWvs2+v0 FGEqSh8JxkcJePVezVKjuYR8vQ5Y7LmPBuTlPhBZ6ELn7wDK0n8DJhPvp+7teKPPjVJh xlc9jgpk5SxdbFTmwPx7eUgmwJ7eSBg/+DXFZH0/1gmmwstOnSUydOiwnd5PDcOy7wLG IA0f8nsBZufVkm6GPsQYN60RBWKPh91S6eP7Ken5efH3P0cH66LZ+9YC//KmY/eyjnq6 EZ4A== X-Gm-Message-State: AOAM531+m1EFvyozl5ISS3GfLyJWEZSsae4FPnkOps1rodnUwzsPfzwI CJOi7TTA7hAU9We3KmX591L/gBBKOxBB9xHIrlE= X-Google-Smtp-Source: ABdhPJxhB6OQt3C/uG/MUGsSrNcbvRCZknlknkVCMcgEjBBLmxFci76pzvCFGdeTQQo6i6oNWcmkPNLLl0F2rz/T1Sk= X-Received: by 2002:a05:6402:3590:: with SMTP id y16mr9238556edc.21.1614452045937; Sat, 27 Feb 2021 10:54:05 -0800 (PST) MIME-Version: 1.0 References: <8D73024D-E4DB-4D04-A917-3B399E65D495@gmail.com> In-Reply-To: <8D73024D-E4DB-4D04-A917-3B399E65D495@gmail.com> Date: Sat, 27 Feb 2021 18:53:55 +0000 Message-ID: To: Claude Pache Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000b4808905bc55e88a" Subject: Re: [PHP-DEV] [RFC] mysqli bind in execute From: tekiela246@gmail.com (Kamil Tekiela) --000000000000b4808905bc55e88a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 25 Feb 2021 at 08:35, Claude Pache wrote: > > Hi, > > In the paragraph =E2=80=9CDifference between PDO and mysqli=E2=80=9D, you= propose: > > =E2=80=9CArray keys are completely ignored. mysqli doesn't have emulated = prepares > nor does it have named parameters.=E2=80=9D > > Instead of ignoring the keys, I think it is better to throw a TypeError > when the provided array is not a =E2=80=9Clist=E2=80=9D in the sense of `= array_is_list()` > introduced [in a recent RFC] (https://wiki.php.net/rfc/is_list). The > reasons are: > > * provide the user with useful feedback when they are attempting to do > something dubious and/or their intent is ambiguous; > * be forward compatible with possible future addition of named parameters= ; > * reduce the difference with PDO for input that are accepted in both > mysqli and PDO. > > =E2=80=94Claude > > Hi Claude, Thanks for the feedback. I thought about it and I have to say I honestly do not know which way would be better. I haven't received any other comments so far. What you are proposing makes sense, but I don't know how to implement this. I am not so experienced with PHP internals so I would require some help to add such an error. The only other comments I have seen so far are from Reddit https://www.reddit.com/r/PHP/comments/llntv5/php_rfc_mysqli_bind_in_execute= / I could add another voting option for people to decide whether they want the keys to be ignored or if they want an error. I appreciate it if anyone has any other comments about this proposal too. Kind Regards, Kamil --000000000000b4808905bc55e88a--