Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128438 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 57A041A00BC for ; Fri, 8 Aug 2025 14:59:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1754665066; bh=IsGIVD0gh9mprc2MCTTe6DPMm8Hlk9vON+oKPthaHr4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=KRrKRC8/LdDY8Le1CS5LTD8soivcatyoNHrC9oSOKn0imLUuqUDDgfkLPZvUMDLT9 oVS1Uv6ZgVmgD4UGh7PdRZcGNR8qs6ueFHhY2euUOTJGckNvo8AcJcawXI3Pn2XgsO grpAvGQ3wYHKI0tf75cY1WJxgwHdxM/dnUMMIuUUoIjwMxspJliLpExBKMKJrJwPnR q3fkn9PninsHv/RaLG4nEQ3vXt98AVvhqurCOi3FosKWWyLZo5+1IVZ5zxQQkOPXc7 o9g3GkAU4pEMAPulLCwD2h3aDGo/eEkykULHkJ++i4fj+/7gz3bcxEGUPSHF6JHNjQ XFLg7Ai98IGHg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7F0F518005B for ; Fri, 8 Aug 2025 14:57:45 +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.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_ENVFROM_END_DIGIT,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-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) (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 ; Fri, 8 Aug 2025 14:57:45 +0000 (UTC) Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-33226bac198so18380221fa.2 for ; Fri, 08 Aug 2025 07:59:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1754665163; x=1755269963; 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=IsGIVD0gh9mprc2MCTTe6DPMm8Hlk9vON+oKPthaHr4=; b=SnZntJzIGz61yaXH3Tl9hYdozU+swUEOF9PrtMqAMCGcWDUeBUeWt7MnXFg5D7Gt+I e2GONbx33d3w3F4TJAsrp43BU8LwGU8t1NMx2GV0yyAX/R7Nvi/U8iafA6ZOPskZWsvl 6a9mYkNBi8Jd/lvUYUnSHYLPKT0TqiHVS7DJ9mPXDSKAr1RJFLGSEamjuX4K/rcy+bcz T31rpRWR/A4o5BwLq4UcTKrx2gZcnDrmbtcuJxs/uVs14Dnw72crqyqlau0rSxRWSSRi xnm82Kl4QisD8dm5FiH+ar0N5h/JELwMgWZigJbeUPUKqr0+GnVR7WUJcyZYcftI1Klj NRKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1754665163; x=1755269963; 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=IsGIVD0gh9mprc2MCTTe6DPMm8Hlk9vON+oKPthaHr4=; b=BiIH8Rr3ihdxnAPyH2eh8OWWhZZuUZRBTt3BgARKrJYEWiOM7wtQQlC6oaoedO7Kvl WXTxv+0TAkfTUB9cT1TKL/AcFW4s0jBQJTG+g9tQVSDslbMtxZg8kJ1Qsh4Pw8mK+K4I 5zei2n6tjpFOfWFcoi3L6JlwAXTzYBJu31gSiXVnmd5qTuNQ5BdtXaqyFXhmfWO7yk3u g59ORFwHo5egA0SCkeTKVDNDpyJt768w4+sh81KFDd+haph6+I6P0xqDUix5msIFVHYS gAnXosbEjpRlOecoVtUhPA9E5A/oROZhN32F6WhOufmf16j8H3qi++UoO7eGN7DemjOH yFWQ== X-Gm-Message-State: AOJu0YymLQZo+htiVXSCQBTYNodh4yFPTWJNbIHLryTBJFCKsYXL3ZUq ivt3MftkmJYbxqTBUr13rmu8md1kJSHE001R9Jtk7mZ84TQ3X+TpZWrWLMNlYxCCoynXCF1lLep N+BgrEj7nmjrZ/gvsVZmZLH6PRtirs8tFJry7SbAyxw== X-Gm-Gg: ASbGncvtwg4LhQAoIfDnIODw1rilCY7hv5yuv3kr1C2SaNPAMv3ANnKD+aMOw4Aywna DoWm2SPkqn7gZBk1dZBOEyzMMZ1NjZ/zYv2R2oYZKR6k52PHRyBJzjdcs+mYpqIoSISwmUkxwWZ lfWs6fLbjSuOqh5dC2Vd67mIw0AhU6OY8NTyWzbIg6md3wayM/yTB8VdpzN9x2FPdJOAWb52A1w cKTT9ZspE+wTqZI X-Google-Smtp-Source: AGHT+IHmU9o7i+hQxj4pyV0W5bdBEbAOVLAdqRgBVjW2i6MEdvCZB0M7aCFFZb5NBOPdKp6XafuuX2rx0WerJ3Y5LzU= X-Received: by 2002:a05:651c:304:b0:32c:bc69:e91d with SMTP id 38308e7fff4ca-333a22900dfmr5912101fa.39.1754665162396; Fri, 08 Aug 2025 07:59:22 -0700 (PDT) Precedence: list list-help: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 8 Aug 2025 17:59:10 +0300 X-Gm-Features: Ac12FXy2YykIS1zsFaPspAKLGsAWhxsDaM82pVNCVkh6MKfPX5zvbNnzJJqBuwg Message-ID: Subject: Re: [PHP-DEV] PDO Disconnect and Persistent Connect To: Robert Wolf Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000b45a49063bdbd1fa" From: tekiela246@gmail.com (Kamil Tekiela) --000000000000b45a49063bdbd1fa Content-Type: text/plain; charset="UTF-8" > > The added complexity of the feature seems to outweigh the benefits, which > as best I can gather, is primarily to allow for ad-hoc PDO object creation. > If that is truly all it brings in benefit, this is a use case easily > supported by the user via singleton. > The primary benefit and use case is for slow network connections between PHP and MySQL. Persistent connection helps avoid the overhead involved in creating and authorizing a new connection on the server. The main disadvantage is the confusion it brings to an average user who has to be aware of many pitfalls that come with reusable connections. > --000000000000b45a49063bdbd1fa Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The added complexity of the fe= ature seems to outweigh the benefits, which as best I can gather, is primar= ily to allow for ad-hoc PDO object creation. If that is truly all it brings= in benefit, this is a use case easily supported by the user via singleton.=

The primary benefit and use case is for slow network connections between = PHP and MySQL. Persistent connection helps avoid the overhead involved in c= reating and authorizing a new connection on the server.=C2=A0

The main disadvantage is the confusio= n it brings to an average user who has to be aware of many pitfalls that co= me with reusable connections.=C2=A0
--000000000000b45a49063bdbd1fa--