Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119014 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 27300 invoked from network); 15 Nov 2022 19:23:58 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 15 Nov 2022 19:23:58 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7CC45180211 for ; Tue, 15 Nov 2022 11:23:57 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-oi1-f173.google.com (mail-oi1-f173.google.com [209.85.167.173]) (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, 15 Nov 2022 11:23:57 -0800 (PST) Received: by mail-oi1-f173.google.com with SMTP id v81so15925821oie.5 for ; Tue, 15 Nov 2022 11:23:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Qo+V1mf5S7I6b6f3vPi3gxONWwnjxnfjQgwGiMpou78=; b=OI4YlVjSH6yWKtn/r9VnUe8lS6ne+Uaq2DsmQZsB9LgHTI8c3lYXUff6r7SkD9WZ8c K1wxNI50o565OQmdd57c33kFNHzub4JOTNEPnPiFeWrAo/t3/lqM9d20DqoRofC50dav XhyR8rrJqDtzPDSwQO/evUMFqbO06U1/i6z4jKF5uyny2nzoEvC8ghqdbTDDBgZdoexR GXdbOUtzII6Jsjn58n+unAHCCKzqDCxzELTp1mCXHK3nIi30BgXWWWaFvMc61WPxL90r Uy/EpyT9I+I3szCTdMVvVcHxxKE3Wxzz082DYvPziyWLBe5asrRtfi2pf/Zrpzw1v9bj 6+Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=Qo+V1mf5S7I6b6f3vPi3gxONWwnjxnfjQgwGiMpou78=; b=w5OrUJNAhHSSirx76DnViuheAwVcmq2c9nhzp6iT688M1Q7tCKMH/XEIuSmQ1yDZH/ QgYO/yVfDpytxJh6CdH1iOTnwfKoBlYu+9MvIa6nUYS19DjcNgAHG7CLcC14cRrR0cyb xCUQii/ampSUoeBJRx454NyLvsGbWLI57QV4S4/hFk0IY884yjPRlzML1NhW1BtVTKZ/ nO3dtxOP+RXNEbLkzYRGt94iaftLFZCinwRj6Cd74dZTLizFj4ls2tL7JVZrwi1EMgvx wJZy+fyFUx4/PHZvuqc0jYArE8kzt4jKlsROmJ6/gBGhBOlPB1Qomht1Y0wI9fHCVn+8 bKhg== X-Gm-Message-State: ANoB5plF5K3JIp7Vh6lffhm9VauUotiUX2pe1nMwA2nNckogCTKNrMT6 T/jCjJInBQyQwqHApdG2wjtKsiO9vAVEuIt0Sj+m7kMPIYOI+/Do X-Google-Smtp-Source: AA0mqf4K4yuSes8rpgWhZncq0kgBpFTBdp+nQ60tO+t469YV/xrwHSdeJI0c1/5ycOjKZVq1AOXQ8rLtKSJZANt5hyk= X-Received: by 2002:a05:6808:1492:b0:35a:7300:7208 with SMTP id e18-20020a056808149200b0035a73007208mr1139013oiw.75.1668540236382; Tue, 15 Nov 2022 11:23:56 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 15 Nov 2022 20:23:44 +0100 Message-ID: To: Rowan Tommins Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary="00000000000015628a05ed874ceb" Subject: Re: [PHP-DEV] [RFC] [Discussion] Readonly class amendments From: kocsismate90@gmail.com (=?UTF-8?B?TcOhdMOpIEtvY3Npcw==?=) --00000000000015628a05ed874ceb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Rowan and Alexandru, I'm not totally clear what this sentence is saying: > > > Reinitialization can only take place /during/ the |__clone()| magic > method call, no matter if the actual assignment happens in a different > method or function invoked inside |__clone()|. > > Are you saying that invoking a separate method like > "setSomeProperty($blah)" from __clone() is allowed, or that it isn't? > Perhaps a couple of extra examples could be added to this section > demonstrating what would and wouldn't be allowed? > Sorry, I tried hard to articulate the behavior, but then the wording still needs some clarification. So this sentence was intended to convey that properties can be reinitialized during the execution of the __clone() magic method either if the assignment happens directly in this method, or in any method invoked by __clone(). Is it clearer now? Thanks for pointing this problem out, and any help with the wording is appreciated! For proposal 2 part: "Readonly properties can be reinitialized during > cloning" > From the details there I understand it would affect properties in a > readonly class as well as explicit readonly properties in non-readonly class. Is that the intent? If yes, > maybe we can share an example without a readonly class as well. I didn't bother to add a separate example for explicit readonly properties, because I mainly regard readonly classes as a shorthand for adding the readonly modifier for all properties (even though I know there are some other differences between readonly and non-readonly classes). That's why I don't think it's worth adding two different examples, but I'm ok with having one example with simply readonly properties, without the readonly class modifier. I think the example will be clear enough this way. Regards: M=C3=A1t=C3=A9 --00000000000015628a05ed874ceb--