Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99118 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 26421 invoked from network); 19 May 2017 12:14:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 May 2017 12:14:17 -0000 Authentication-Results: pb1.pair.com smtp.mail=dorin.marcoci@marcodor.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dorin.marcoci@marcodor.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain marcodor.com designates 93.115.138.71 as permitted sender) X-PHP-List-Original-Sender: dorin.marcoci@marcodor.com X-Host-Fingerprint: 93.115.138.71 mail.marcodor.com Received: from [93.115.138.71] ([93.115.138.71:44444] helo=mail.marcodor.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E1/E8-23431-891EE195 for ; Fri, 19 May 2017 08:14:17 -0400 Received: from DESKTOP9R8I199 (host-static-93-115-138-66.moldtelecom.md [93.115.138.66]) by mail.marcodor.com (Postfix) with ESMTPSA id D8FB76C4776; Fri, 19 May 2017 15:14:13 +0300 (EEST) To: "'Adam Baratz'" Cc: References: <000601d2cff3$bbffc5f0$33ff51d0$@marcodor.com> In-Reply-To: Date: Fri, 19 May 2017 15:14:14 +0300 Organization: Marcodor Message-ID: <002401d2d099$6e829130$4b87b390$@marcodor.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQKui4TWyrBa+Xk+uOoGXxI7mVHe7wIi1HjYAym2+eWgGbIlYA== Content-Language: ro DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marcodor.com; s=dkim; t=1495196053; h=from:subject:date:message-id:to:cc:mime-version:content-type:content-transfer-encoding:in-reply-to:references; bh=oiCNx3NqDT85LnSXWRlRtjD7bt2p4aUMQ09dvsX2sB8=; b=ZJq7n3ni6QUHvosF+2rrIDEyexJvubcQAYfD/U6KlnCM8HhMUv6xLVgRNPfD/LiQw4OLg7 Z9YO2FYc1SYHNF0Q1//krbdUzWSbQESDw9lrUkRRKYBbaDwbn1W5LLmRjwj8YQaifvBhx5 Mjs6MKEaJALutI/T/eByxHcCH6NKQ0FCAtppgfEhrYd9hRaKaO//p1zo7oef5Z7l7zPWm5 mRZfxpNZQ8wwB7dVVpbd/KftjtZhnFZIdwxn56jAJH1qLuFAV2+Cs9yHJz3iHZRkm1BvZm siRty2MTyZQ8rN4qp6jbbRYkQFp2Vxf9p66fxX7Aet3aRY/zt0C5W5VtvL6MHA== Subject: RE: PDO Parameter types // PDO::PARAM_AUTO From: dorin.marcoci@marcodor.com ("Dorin Marcoci") Hello Adam, > From: Adam Baratz [mailto:adambaratz@php.net]=20 > Sent: Friday, May 19, 2017 1:26 PM >> Maybe even a better way is just to change default param type from = PARAM_STR to PARAM_AUTO in bindValue family routines, without any driver = options or configs. >> So if drivers supports server prepares with type hinting, OK: treat = it better, if not, push it as a string like is now. > I'm not sure that changes the proposal too much. My position is still = that I'd like PDO to be less "magical," to put more of the burden on = providing the right content to the user. Do you think by replacing default PARAM_STR with PARAM_AUTO will do a = lot of magic?, it seems really minor or nothing at all It will just prevent casting ZVAL internally to a string ZVAL for a few = drivers that supports server side prepares. Each PDO driver will have a static bool property that will control this = behavior with defaults as it works now. It should not break any portability across drivers, especially when this = data type is explicitly specified. Can you find a sample where this change will have some impact? How "your" driver works when you do bindValue('param', false) and = expected field type on the server is a boolean? I think server side prepares are a really good feature that we should = take into account for servers providing this, not just by cutting = features because of some that do not support it. ps. Sorry for previous message, sent by mistake, anyone could delete it? - D.