Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113299 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 39460 invoked from network); 27 Feb 2021 14:14:16 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 27 Feb 2021 14:14:16 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 38A8B1804D0 for ; Sat, 27 Feb 2021 06:03:47 -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=0.4 required=5.0 tests=BAYES_20,KHOP_HELO_FCRDNS, SPF_HELO_NONE,SPF_NONE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from processus.org (ns366368.ip-94-23-14.eu [94.23.14.201]) (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 06:03:46 -0800 (PST) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by processus.org (Postfix) with ESMTPA id 901E15101324 for ; Sat, 27 Feb 2021 14:03:44 +0000 (UTC) To: internals@lists.php.net References: <499c2591-fb11-1b9d-d402-39f7ec1c6b85@themad.com.au> <6EC89E9A-035D-4D2B-97D7-845DC4FF3E32@koalephant.com> Message-ID: Date: Sat, 27 Feb 2021 15:03:43 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Authentication-Results: processus.org; auth=pass smtp.auth=pierre-php@processus.org smtp.mailfrom=pierre-php@processus.org X-Spamd-Bar: / Subject: Re: [PHP-DEV] PDO integer changes in 8.1 will stop many websites I support From: pierre-php@processus.org (Pierre) Le 27/02/2021 à 14:18, David Gebler a écrit : > Apologies, in respect of point 1 in my reply, I misread your original > message and didn't realise you were referring to the upcoming 8.1 change, > thought you were referring to the current 8.0.1 release. > > This change AFAIK only affects emulated prepares and is an improvement, as > previously you needed to have emulation off to get the correct data types. > With modern PHP, MySQL and mysqnd there is not really a reason for anyone > to be using emulated prepares anyway so my advice on points 2-5 remains the > same. > > Dave Hello, I'm curious, why are you stating that emulated prepares are not useful anymore ? Using the prepare() function as I remember correctly seems to be the only way to execute a query that allows you to pass an array of parameters instead of having to call PDOStatement::bindParam() for each parameter. That's the only reason I use emulated prepares anyway, it allows to use this API without actually preparing the queries, which is what I want most of the time. Did I miss an improvement on that side ? After reading twice what I said, I'm thinking that calling many times bindParam() in a naive foreach would work anyway. Is there any actual downside using emulated prepares this way ? Performance wise ? Feature wise ? -- Pierre