Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100139 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27688 invoked from network); 31 Jul 2017 15:00:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Jul 2017 15:00:41 -0000 Authentication-Results: pb1.pair.com header.from=newaltgroup@bk.ru; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=newaltgroup@bk.ru; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain bk.ru designates 94.100.177.104 as permitted sender) X-PHP-List-Original-Sender: newaltgroup@bk.ru X-Host-Fingerprint: 94.100.177.104 smtp44.i.mail.ru Received: from [94.100.177.104] ([94.100.177.104:35900] helo=smtp44.i.mail.ru) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9A/3F-07025-7164F795 for ; Mon, 31 Jul 2017 11:00:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=bk.ru; s=mail; h=References:To:Cc:In-Reply-To:Date:Subject:Mime-Version:Content-Type:Message-Id:From; bh=9sJdx/Rsm0Hksvgf7wv8K1dZrOwWkAEpN6MthiyqxC8=; b=btcwyZBJrUS8jbAkWn5Cup8gKwjWxC2RgLosZ3E96SFOetfiysJBHhyusFqcAQPZTJnm7YaKrTbJfDo1LDmLwnbB5MxynvnJF7hBQB8na2wPQHdhz/C26Yb7tjtKRwh0eYjTQ/VzPhITChOhXcp/cZ4yHHZbL/4vkFa5dNlCKqo=; Received: by smtp44.i.mail.ru with esmtpa (envelope-from ) id 1dcCBQ-0000ME-KN; Mon, 31 Jul 2017 18:00:36 +0300 Message-ID: <94973CB5-A3F8-4BE4-9A78-8F759D1829E7@bk.ru> Content-Type: multipart/alternative; boundary="Apple-Mail=_FB4B2FE2-CB22-41AE-825A-D21F197D9587" Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Date: Mon, 31 Jul 2017 18:00:28 +0300 In-Reply-To: <1501512881.14647.31.camel@schlueters.de> Cc: Dan Ackroyd , "internals@lists.php.net" To: =?utf-8?Q?Johannes_Schl=C3=BCter?= References: <1907EFF3-ED77-4F5C-85AA-CDFE323369C5@bk.ru> <880CDC06-17D6-4E40-8A48-F2E1CB405667@bk.ru> <2A653728-97CA-4AA5-BA30-5BF26FABBC2A@bk.ru> <1501512881.14647.31.camel@schlueters.de> X-Mailer: Apple Mail (2.3273) Authentication-Results: smtp44.i.mail.ru; auth=pass smtp.auth=newaltgroup@bk.ru smtp.mailfrom=newaltgroup@bk.ru X-7FA49CB5: 0D63561A33F958A5C04D166D79E98D762E9D9DF2DE448034DF1733DD2B358E3C725E5C173C3A84C3AA8C68A3574AB3B477F66C5048B2E4907649B479DD24E3CAC4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0F5D41B9178041F3E72623479134186CDE6BA297DBC24807EABDAD6C7F3747799A X-Mailru-Sender: 5359E0D685F10627A37960CE499176816773454658F8402A903B0E7FC47664DC01573EFA8830EFD318C1F6AB3FBD83F13DDE9B364B0DF289B1C9E140B68917A5027D9DD7AE851095AE208404248635DF X-Mras: OK Subject: Re: [PHP-DEV] [Request][Discussion] Introduce interfaces PDOInterface and PDOStatementInterface From: newaltgroup@bk.ru (Andrew Nester) --Apple-Mail=_FB4B2FE2-CB22-41AE-825A-D21F197D9587 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jul 31, 2017, at 5:54 PM, Johannes Schl=C3=BCter = wrote: >=20 > On Mo, 2017-07-31 at 14:49 +0300, Andrew Nester wrote: >> That=E2=80=99s actually the thing that you can=E2=80=99t use >> PDO::ATTR_STATEMENT_CLASS with persistent PDO. >=20 > The actually question is: Why not? - =46rom a quick glance on the code = I > see no obvious reason. In speculation I assume the implementor thought > "Well, we can't guarantee that a class that is there in one request > will be there on the next release and it will quite certainly be at a > different memory address thus the cached class_entry pointer will be > wrong" but the user has to reset the attribute anyways ... we just = have > to make sure the different dbh->def_stmt_flags are clean when a new = PDO > connection object is created recovering an old connection ... >=20 > johannes Besides code style/architecture things (which is of course questionable) = the issue with ATTR_STATEMENT_CLASS is that it simply doesn=E2=80=99t = work with persistent PDO connect and raises=20 "General error: PDO::ATTR_STATEMENT_CLASS cannot be used with persistent = PDO instances"= --Apple-Mail=_FB4B2FE2-CB22-41AE-825A-D21F197D9587--