Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128755 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 7B4771A00BC for ; Wed, 1 Oct 2025 13:45:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1759326275; bh=aiHIy+rUIZOli0XAKLDVseVAenDzHwLrs4JWC01C/CQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=nsyfZjwaP+Mm0qzd6NNtu6JgmzxARmgM5RdB4B2DdXMN9zZdYCmrBwfwy2wHFzU5Q 8kVg9sfgS1XsVnheWKctsG+Oy717412feSDIrxB6UwHTYRrVFJ18V3bXkAFXy/28S1 3819mxZ7vkMtjz9Zgg1nOScb+XTTUX+9KcdD5VivlFFbNdFHjq57RtEsTxHzoQIod6 jXTPKmIZgmENtxDyfny9LHjOdgWste+fB07xO6/gAdofCH+60/a7BNnKF9V/t0GFfh 3wX9ajVSZ7jCHzaqVVLnTob/YdVvCINxggv5HBCKR2k79KId8qWazz1ge0HL9+x6Zv H3+eeTWl9T+Xw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 57F6D18006E for ; Wed, 1 Oct 2025 13:44:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 1 Oct 2025 13:44:34 +0000 (UTC) Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-62fca216e4aso2410173a12.0 for ; Wed, 01 Oct 2025 06:45:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759326352; x=1759931152; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=aiHIy+rUIZOli0XAKLDVseVAenDzHwLrs4JWC01C/CQ=; b=jkK2uxzvvR7KMEy/Ma2i1mSOjkZZsl34lnjE1Fv8bQGEKgnxJNJlP/VNbN+iVvvwQh bsPjcjTBjkbu1UzLWGKlWTxzO4Zqb3z0dVLlJr1bZGJ1hO/yV0Xl8DzA3UpMPS4oujd5 yzQzUfNalue28GEWHUGT8BXL64Kz3LAtuXat4GwGM14o43sS0OUWVbYbZ6d7pznnMb5Y gg3b3paa8zV1NPUo5C0iodJFWi5eie2dPL16hQDqWrBgnkImJ52RcgnnBg3sva6WlK+Y 35nlgKQcI7FZ1bA5DO/3VhqEKYCZLZzaKA7pSNbczaV/O4YAqdkoADKil5EnxjmKSU3e j4mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759326352; x=1759931152; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=aiHIy+rUIZOli0XAKLDVseVAenDzHwLrs4JWC01C/CQ=; b=qWw2mZZpVEsomduy+8C8EsMzrCdW43pZx+gCHxcxm3AsLri8aOqeKrZnuPrYix6CLZ WFdKdhe8hfOSvpzwJ5OnnZ+eH4fvB0+GL0k8Cgpvf2b/vrrg4j3w3XMZLTN3bSfHD4PN KGDqI4XZ5/eGWdXr7YHmmGn4/Bw2yEYGcgPoOMWNy0A4SQf9bNg3n+XQUlucodTbeukL OfgiDvtniDcYLqkyMzM7Xh4eVFCklbbAmyi9YAE0njM2g99Yv7EyVtsQ1lB/Z/5pWD69 47HGDGPaLVlpY5bIx3Q2p9jzLObREuq9QggIHIo1OakXq+Wvc7Myx9b1ZazvfwJxGFFC ynUg== X-Gm-Message-State: AOJu0YwG2dUC8n2OKsNliPhf71vCzOuScpstLYQKiiVDUOj7eknRB5aq zg0ajCqggWGPdUWSADwTMxs/SynHh6cLh3ORqM5N6PGhM7aEO/3GuvCUBeZ/dfQYnapj2kUisDo 5TG6c8i5Adz5SzEpqF5S9em2WButvdLswl8jgCMk= X-Gm-Gg: ASbGnctCkx6RParaq5YPI+Oku3yUr/YLkgqWGuw/aMWTT/NXxbic1XBF4wNN5UvdxVY 05n8fc6xe8aiHQ4treLQttC/Ubhnz1O6bN3ngE3lYVLJDA3lRQgqJ2mqV9HQEWvCtE7vVRoK4Kt 5Mo2D2wj+bH9xHqy1cwTdJb5Ogcc02GoDJ536l5Z5+xgJIFZgtyPYTEHkchO9SB7X8RzCb202fP 9fCccGGJIdwhHV6etoTCLnNOtn/YLa97mCF0Je8 X-Google-Smtp-Source: AGHT+IGIu0VHSZlKQLqilvXpSOyPfP5r9zJDm1hFOSLt5OTRDLzLkH4sm22anEyGZ6U+z8JopoCxDJZ4VIho4VL8+8A= X-Received: by 2002:a05:6402:2551:b0:61a:7385:29e3 with SMTP id 4fb4d7f45d1cf-63678ca5983mr4682044a12.18.1759326351516; Wed, 01 Oct 2025 06:45:51 -0700 (PDT) Precedence: list list-help: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 1 Oct 2025 09:45:39 -0400 X-Gm-Features: AS18NWDpEOK3UL-eGfNTHaYh5YFP1foejU7ue0R-t0SPZ5J9vj6tN94g9TRu_ZI Message-ID: Subject: Re: [PHP-DEV] [Discuss] Add PDO disconnect() and isConnected() To: Claude Pache Cc: PHP internals Content-Type: multipart/alternative; boundary="00000000000039e7ab0640191625" From: rposky@gmail.com (Robert Wolf) --00000000000039e7ab0640191625 Content-Type: text/plain; charset="UTF-8" > I generally agree that there's little value to a disconnect() action; unset($pdo) is already sufficient. See the point again about persistent connections. The user has no means to disconnect in that case. > I recommend to use a name that deters users from using it in normal operations, e.g. pdo->debug_manual_disconnect(). Considering the above as well, a possible stance to take could be to introduce it as persistent_disconnect(). We could then decide whether it should function on "regular" connections as well. --00000000000039e7ab0640191625 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> I generally agree that there's l= ittle value to a disconnect() action; unset($pdo) is already sufficient.
See the point again about persistent connections. The user has no mean= s to disconnect in that case.

> I recommend to use a name that de= ters users from using it in normal operations, e.g. pdo->debug_manual_di= sconnect().

Considering the above as well, a possible stance to take= could be to introduce it as persistent_disconnect(). We could then decide = whether it should function on "regular" connections as well.
--00000000000039e7ab0640191625--