Re: [Discuss] Add PDO disconnect() and isConnected()
| From: | Matteo Beccati | Date: | Tue, 07 Oct 2025 08:42:59 +0000 |
| Subject: | Re: [Discuss] Add PDO disconnect() and isConnected() | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-128795@lists.php.net to get a copy of this message | ||
Hi,
Il 01/10/2025 20:07, Rob Landers ha scritto:
During the years I've seen so many horror stories related to usage of persistent connections. I would argue we should discourage their use (deprecation is my dream!) rather than encouraging it by adding new features. My 2c. Cheers -- Matteo BeccatiThis sounds better, but I would argue that if it's a PERSISTENT connection, then it should be impossible for the user to close it. The idea is that the connection should remain open after being established and should only close when the server restarts. What scenario would necessitate the user to close a connection that should never close?Off the top of my head (and it depends on the actual database on the other end of the pipe): <snip> Right now, you have to jump through a number of hoops to do these types of operations.