Re: [Request][Discussion] Introduce interfaces PDOInterface and PDOStatementInterface
| From: | Johannes Schlüter | Date: | Mon, 31 Jul 2017 14:54:41 +0000 |
| Subject: | Re: [Request][Discussion] Introduce interfaces PDOInterface and PDOStatementInterface | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-100138@lists.php.net to get a copy of this message | ||
On Mo, 2017-07-31 at 14:49 +0300, Andrew Nester wrote:
> That’s actually the thing that you can’t use
> PDO::ATTR_STATEMENT_CLASS with persistent PDO.
The actually question is: Why not? - From 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 ...
johannes