Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120133 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 26015 invoked from network); 26 Apr 2023 00:25:23 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 Apr 2023 00:25:23 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6D5FC1804D5 for ; Tue, 25 Apr 2023 17:25:21 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS19151 66.111.4.0/24 X-Spam-Virus: No X-Envelope-From: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 25 Apr 2023 17:25:20 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 573955C00D6 for ; Tue, 25 Apr 2023 20:25:20 -0400 (EDT) Received: from imap50 ([10.202.2.100]) by compute4.internal (MEProxy); Tue, 25 Apr 2023 20:25:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-type:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1682468720; x= 1682555120; bh=2h5Jt3wfnKSjBmIh95Q2wza32cW72XKpEX2/dCPOkA0=; b=F eWPQmvWwh7aVwHiY0y6IMdGr1/70aDMa0lDui60bc88q+dqd1IKq0IuCtCD9crAS Q/cAilOco0uCPmVXb3b+jrctkLkOFNSrWKB6Gj49bghBC1zGfs4qltCREpehy1sl yIaaChFggpIPDN+RlCH+3YdyOdl0pMsqdjeAATeW9kPfBFXVOVEZUxer9cqHXinL aK1eXRjMdWO9XVYWkQIpJjgEt6d41me7B4EttYlj3BS4mPQ7q6AkuyFVI7EcMNpo uMyBvYM7ybthPW5qU673J3hdV2bVW044PsJGZ6GYn5f4f1YI5GfpX/oKlYH2Ste1 szYCxzDIbKsJaGRHDU4vA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1682468720; x=1682555120; bh=2h5Jt3wfnKSjB mIh95Q2wza32cW72XKpEX2/dCPOkA0=; b=V2BqsrrGlv7OH4axjcknCg6Ay2ZiT YhTvVckOAFJ33EoAeHe25N2XHemQYJYtZro4DXnKxZ+JYWrsBp+eFP48EJ9XSnSK Gw3IT6BEB99vQdAET6pJedyltkNlpvNf4Jrta9iZ02u3FarEJrxG21Q8rYEuKQOS WljVT4ytt97SRCICteYcLAbg88PMDRP/RPl1LTeoys+npQvceE4Bv/wFWweGdNfQ DYjepviZw1EpNqvklP/jmqkUeAresV2Cfq/f84DpjSNIcNIkmbF2/UXN2NVKGdnp zTWTrtbTd5dkVK9I6JMKwcsN3UKmvcXoz0eXqWm01xJtVWvbE9sdagy/Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedufedgfeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdfnrghr rhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtoh hmqeenucggtffrrghtthgvrhhnpeeglefgkeduiedvvdetffeujefftdfhjeeiveehgfff keduveektddvledvvdfffeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 180671700089; Tue, 25 Apr 2023 20:25:20 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-374-g72c94f7a42-fm-20230417.001-g72c94f7a Mime-Version: 1.0 Message-ID: <799ae864-6e25-4196-a5ce-0d74600a8378@app.fastmail.com> In-Reply-To: References: Date: Tue, 25 Apr 2023 19:24:58 -0500 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] [RFC] [Discussion] Clone with From: larry@garfieldtech.com ("Larry Garfield") On Tue, Apr 25, 2023, at 11:23 AM, Nicolas Grekas wrote: > What about using a real closure to define the scope we need for cloning? > That closure would take the cloned instance as argument to allow > manipulating it at will. I believe someone mentioned that one previously in the thread. The problem is that the closure would run in the scope of the object, not the scope of the caller. That means if called outside the object, it would allow modifying private or protected properties. The itemized list of values (whether an array or named-args style) would allow the engine to enforce access restrictions, which is a desireable feature. --Larry Garfield