Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130160 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 084C91A00BC for ; Tue, 24 Feb 2026 19:52:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1771962773; bh=lmeB4rEXKbbyVoNdLJcBSPMeJ7ViGZYvp4fEcVWnymI=; h=Date:From:To:In-Reply-To:References:Subject:From; b=T+N0tbMYKaNxypn8mCHGN4/vOVksNK4feBlaghJoAED2cuiqVfy4Xo+9F44PxxcYJ m0AaOSzBJDriTpbXwt3xua4t//OxYef2gaurvku866Cd6l6RVMV6Ymwm2JPFK81u/z DqHblKSw1t2JsBkZwnxynkEq381O9og3560UeIW1zjG7C15XqocZo5/DusHhsHiiJ1 pn+DJjhtuRFh+Wsy/sDpERTYJcqojHGILQQB4TGJpNF9DWeXkZMza8IGqixpxmvBuk cMo8MLFnJmNQIiFxQ95UlMcSVTJGkHMQAxaMdb7+0HM1ksNvpRx/nx2K39a8ZvCVny JjhXFSZMMR8Eg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 82A601807A8 for ; Tue, 24 Feb 2026 19:52:52 +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=-1.4 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from fout-b1-smtp.messagingengine.com (fout-b1-smtp.messagingengine.com [202.12.124.144]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 24 Feb 2026 19:52:50 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.stl.internal (Postfix) with ESMTP id D84361D000A1 for ; Tue, 24 Feb 2026 14:52:44 -0500 (EST) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-04.internal (MEProxy); Tue, 24 Feb 2026 14:52:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm3; t=1771962764; x=1772049164; bh=fEl6PJIT+WB+p9T1gu+CM ImfZMgzZMECXLkeCWxDR1Y=; b=ZQ3AQQCy3kSa59DL19Sp3UsUzDC7Z1o7uamAn HhG9nUGG9FinKHQyqCwcc5Za+DpzFA82qO0AcRXSt0gjSi/QxlcRNfmejJt8k1m/ bDX8tMx8l5eFbaiNEp1LqoTWvpXllVB4sktfhj0WfRmvoPEP7ILsObOvGpdopXpz 4drW1vF6GDRxPTtVWjOpoRp4MiTVzgxCzVrj72GNZxfZtC+uVqBT6RkH2IrXQBdX N5heyHOIiimQEMp3ghRldBO7wh41LZ/Cg8ZapF1PJTQPyXz82mEVuHjKoOSPQFqt v6HMuXEL5AQeVTFCn85PBx8eQD+ZjyfHJVVu1qsyOgkoY163Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding: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:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1771962764; x=1772049164; bh=f El6PJIT+WB+p9T1gu+CMImfZMgzZMECXLkeCWxDR1Y=; b=BKTlmhE88amwoepj3 kzGwQepzxbNaVIMFxOXmibqjnSuWxYDyOake6UULDLg66BUNiwwD8pnWldC97f8i MzFaOZw0rMtQTbnuBevIr82ctdzNWh3GBqvfaqnUg7E6lXCBEqJKEW/qGuMzyKO0 S1y19ehpdqgAFZs7IjhurWLvzyELGHOXuhyAJqPp40dFdJttf1d/7yYFm1fXqVSi vXJ8ZnT6WzYPo8QJfbQ82G6Y+l4QFWXw2RL7fyRMkb6yqfcXtXDyymivsJ+Ccca2 LO12XWcE3iz663CaiHleUJoeSMqngyu5YgJ3hgVt7DIZYLtWiTtHFYF0DaTNqi/L vVT4A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvgedutdejucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepofggfffhvffkjghfufgtgfesthejredtredttdenucfhrhhomhepfdfnrghrrhih ucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhmqe enucggtffrrghtthgvrhhnpeeuvedvudfhffffhfelueehvdejvefgleegteegffetudef leehgeefvdehgeelteenucffohhmrghinhepphhhphdrnhgvthenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghl ughtvggthhdrtghomhdpnhgspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpd hrtghpthhtohepihhnthgvrhhnrghlsheslhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 7055F70006A; Tue, 24 Feb 2026 14:52:44 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 X-ThreadId: ApWOO0YdA2Vg Date: Tue, 24 Feb 2026 13:52:23 -0600 To: "php internals" Message-ID: In-Reply-To: References: <4b74f9a1-96d2-4104-abdd-fe56c5e7016c@app.fastmail.com> <585bfc82-a522-43ec-be42-b8945952fe8b@app.fastmail.com> <3cd0d869-5a5b-467c-8eb4-3f8647ba7aa7@bastelstu.be> <6def7a03-eba4-4289-ac4f-0881c5d4c092@bastelstu.be> Subject: Re: [PHP-DEV] [RFC] Allow Reassignment of Promoted Readonly Properties in Constructor Content-Type: text/plain Content-Transfer-Encoding: 7bit From: larry@garfieldtech.com ("Larry Garfield") On Tue, Feb 24, 2026, at 1:34 PM, Nicolas Grekas wrote: >> Otherwise, I'm happy with where this ended up. Thanks! >> > > Thanks for having a look! > Here is the update: > https://wiki.php.net/rfc/promoted_readonly_constructor_reassign?do=diff&rev2%5B0%5D=1771797005&rev2%5B1%5D=1771961558&difftype=sidebyside > > Cheers, > Nicolas > Property hooks cannot be combined with CPP, so properties must be declared separately This is untrue. The following code is legal: class Point { public function __construct( public float $x = 0.0 { set => abs($value); }, public float $y = 0.0 { set => abs($value); }, ) {} } The point about readonly is valid, and worth keeping, as is the "affects all writes" question, but the code above is possible. --Larry Garfield