Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:99102 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 33301 invoked from network); 18 May 2017 10:21:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 May 2017 10:21:48 -0000 Authentication-Results: pb1.pair.com header.from=php@beccati.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=php@beccati.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain beccati.com designates 176.9.123.236 as permitted sender) X-PHP-List-Original-Sender: php@beccati.com X-Host-Fingerprint: 176.9.123.236 box.beccati.com Received: from [176.9.123.236] ([176.9.123.236:34038] helo=box.beccati.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4A/60-23431-CD47D195 for ; Thu, 18 May 2017 06:18:04 -0400 Received: from authenticated-user (box.beccati.com [176.9.123.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by box.beccati.com (Postfix) with ESMTPSA id 63F2B20026E; Thu, 18 May 2017 12:18:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=beccati.com; s=mail; t=1495102681; bh=+72H2hGeH7eXMHw3OUlz0ogLs4qpFUxl3/gYyvPw9z8=; h=Subject:To:References:From:Date:In-Reply-To:From; b=X+t2KDZYY03H247cMy/IeYAIjzGnK+txtbR2ajqOXT9rUCux2E98x/Lmz0KW1W1Fu OaAMsxmwXas5Ir0YjGhIbMMG8rdWxxPyOaEgU2zjgwJABNJ0q0U5MNc26AnIyHyLdb z22fVzhpu5HSLATlg2GIcsYZfK0juL+bUTdfsdjMzBnZC6Ejr46+biztHoEZM6MB6o Qb01vBWqcPgNv211HlnP9av+uIHuAKp/0ANosBuEPvbL1N2+IKrbJZNsDRJI5HETwe fSeAmqWuui8OqYfXxIiodP/1YVftS9OXh9RPVaZny7Cxyc5XYVWduFgTZtDHfqHV8U 59nSYEMBr/bDQ== To: Dorin Marcoci , internals@lists.php.net References: <002801d2cd97$63921700$2ab64500$@marcodor.com> <000901d2cfad$a0349c60$e09dd520$@marcodor.com> <742d91b6-1435-ca97-16dc-9e54295dfcbd@beccati.com> <000a01d2cfba$e13db4f0$a3b91ed0$@marcodor.com> Message-ID: <6e8a86d3-dcde-e98e-2bb2-555945d628f3@beccati.com> Date: Thu, 18 May 2017 12:17:57 +0200 MIME-Version: 1.0 In-Reply-To: <000a01d2cfba$e13db4f0$a3b91ed0$@marcodor.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] PDO Parameter types // PDO::PARAM_AUTO From: php@beccati.com (Matteo Beccati) Hi Dorin, On 18/05/2017 11:41, Dorin Marcoci wrote: >>> ! When a bool ZVAL variable is converted to a string ZVAL. >>> Your example is irrelevant. > >> Ok, I think I got it. But the example shows that the pgsql driver is working, so maybe you could have a look at how it works. >> e.g. >> https://github.com/php/php-src/blob/master/ext/pdo_pgsql/pgsql_statement.c#L382 > > Yup, it is working, I didn’t said it does not work. > > I meant the case when a bool is passed as string, like bindValue('boolparam', false); > Here it comes as an empty string, not "0", while true comes as "1". Please have a look again at my example and the code I linked. How could it work if what you say is true? Please note that the code is in the PDO_PARAM_EVT_EXEC_PRE case. Cheers -- Matteo Beccati Development & Consulting - http://www.beccati.com/