Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113254 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 82265 invoked from network); 25 Feb 2021 08:47:06 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 25 Feb 2021 08:47:06 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 312F51804F4 for ; Thu, 25 Feb 2021 00:36:03 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, 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-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 ; Thu, 25 Feb 2021 00:35:59 -0800 (PST) Received: by mail-wm1-f43.google.com with SMTP id u187so2011026wmg.4 for ; Thu, 25 Feb 2021 00:35:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=cyTj7WWqvklfOef+LQWv1qpxxmRcWbna3KNuT8C/MWA=; b=rYVvfkewLIQl8d513leMVS2Dao10oaUb6F0ib7VTzD2OrJEn/BNwZEAm10mwbXtHUI IWMq6QRxgnLmlA0GOm3xQ/pOOGL7K/zhC9g0ojLezkyTOz7kloduOKAIMlqF5Nwzkisd TR9M5udYObIGQkOsiCqJRB9KJipfa6n3hTcShQnTdxeeyR08NuhTFObSw8MQQGiybx03 m3uPEiSVzN+iPLziOgExuSdfCISDUtdczK/Xoe9sJzs7AVjFpehsUzUUUgkATQ3EIAoB HoVjFlUxXXvgNJuhcHrHr1k3pStMkp+9gTb1a8qXBJ2wQ6HnL97deNofHvK6FNJ/DF5N mvkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=cyTj7WWqvklfOef+LQWv1qpxxmRcWbna3KNuT8C/MWA=; b=ByKvpKBgg0HbMGepLh2AXuTmI8QpkWIm/xJoWE9jJkTuXdKEdAWsjg8bf/R8PT54cn 2YTDwlaYmTqOCmY/9241zJ/9X7KYhUMtc92+6dKiPMZwbX2zq5EErooUSO9TQKJ1z3PA n19U1DihIZAKe18/7ze6TbTxBXZnd24+NzfiSgMQrKoo9G/QBF37/2dPRXENhEji9MpR vv8KN5apeBjEwyBqCDKbcwrWmPTP+o12uphc+7fSX8A9Rw9Ytf8IzjSW0HYUo2cQJI7n 4JDU/kaXaR4DnngxhB0O2v9bHqV6rZtayxNVoB2aoiFcYTwUP1IuUOQDgtrmR6/NuXaL hhyw== X-Gm-Message-State: AOAM531RMo/1smCwgCbaIhDRXTqBNdMkzsE5MYDEh4sD8lWH7QFGHQSR WaToop0wHKgrgkr05YyUGkY= X-Google-Smtp-Source: ABdhPJwt3p1E34BPnjkLNzZa94dHhDG5WMbcVtrG48LbLMiYeIQi+3IH8lQeda2yl96lzM1hX0f2CQ== X-Received: by 2002:a1c:3c02:: with SMTP id j2mr2118424wma.92.1614242157518; Thu, 25 Feb 2021 00:35:57 -0800 (PST) Received: from claude.fritz.box ([89.249.45.14]) by smtp.gmail.com with ESMTPSA id k15sm9009293wrn.0.2021.02.25.00.35.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Feb 2021 00:35:57 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) In-Reply-To: Date: Thu, 25 Feb 2021 09:35:56 +0100 Cc: PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <8D73024D-E4DB-4D04-A917-3B399E65D495@gmail.com> References: To: Kamil Tekiela X-Mailer: Apple Mail (2.3608.120.23.2.4) Subject: Re: [PHP-DEV] [RFC] mysqli bind in execute From: claude.pache@gmail.com (Claude Pache) > Le 11 f=C3=A9vr. 2021 =C3=A0 20:43, Kamil Tekiela = a =C3=A9crit : >=20 > Hi internals, >=20 > I am proposing the next change to improve mysqli extension. This RFC's = goal > is to add a new optional parameter to mysqli_stmt:execute() that will = take > an array of parameters. >=20 > The RFC is located at https://wiki.php.net/rfc/mysqli_bind_in_execute >=20 > I'd be happy to hear your comments. >=20 > Kind Regards, > Kamil Tekiela 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