Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129851 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 735FD1A00BC for ; Thu, 22 Jan 2026 15:33:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1769096029; bh=2Jm5e2mMWXK5ErSAUpCrY4KjHpoLzDe9vIbRamHQSFU=; h=From:Date:Subject:To:From; b=Je0/Vx6SmV5EEsf7Lbu8VQpH6eXfO4dl/bhwTmHgc8vs59+PBLGGijQ5V63XsdjL5 nNu3AV8I2hS7sDM711kYATNQE/IJdgodMW6pYzDg66Sz8jxfElglHtmlf8SqMPdOzr JnrPmLuMqSDAuIDrx91jlGN8Him6N5YEWlwFx22dzTIQF43bs2mUvs3Z8FWt6q6mMs npZQrMWHVjFl6bgC/4m93c4NARdy77qd3rsjmQvelX/V5OPu/YCaduymbh1RL+eRKu EUpQUO91LDoZ/b0AFFOKXKTbHZzle7B8yK6FNj+KVLSEEGGHIjQm+QcuxRdaK7/akN CuG8NqvxWkmHg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2DAA81805AB for ; Thu, 22 Jan 2026 15:33:48 +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=ARC_SIGNED,ARC_VALID,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-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) (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 ; Thu, 22 Jan 2026 15:33:44 +0000 (UTC) Received: by mail-qk1-f179.google.com with SMTP id af79cd13be357-8c53198a65fso107508985a.3 for ; Thu, 22 Jan 2026 07:33:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1769096019; cv=none; d=google.com; s=arc-20240605; b=DtccYiFumG/qBUIbBppkU91hb1BoTdTegmWxAGgFrE3a5OrPH5dfRXEw0xuA+9P1XR 53jtmFoXTm24bA2ew3F6PXBPZo+qQK76TRKMYwwSyqNq7JslIEcZbE/PmiBSrOciXLa3 fRCeJKWe4CyEasYOSVMUiQ//PRvYgnvOna60oaRV2lYal/yIBPeGp49Hkx9LYJuFGBQC KjEYdw8hBRafsJyrvWrXJ8sg1VM/U4oK+2fUkA0GSqnjfANntiqFuZ6cznZQBkbWFi1w t4Kf0cNHsVfeL88kBbGWDKMkjX0gAXY020ibt8N17PSyJeTmbby2fKsplu/6WDguQvTb zX9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=to:subject:message-id:date:from:mime-version:dkim-signature; bh=2Jm5e2mMWXK5ErSAUpCrY4KjHpoLzDe9vIbRamHQSFU=; fh=RFBKMNwdsUBkXmmb8AAjYIg7L3EzMrZygiLbMB7seK8=; b=XHmIGXLdQ073ClJzGYM9AsCZlU59xvN5FEh1CUwgnhkXwsBVNMM3aYGlUOKJNm0fQ2 08T0dy/4iiKvPyLJqtNfgfQU26jpLcK+4NJhWZ/d1feMl0mspwSoqIANZpCI2pTd0zKt 1AGkmmg4WLQfceWgNTiPYl+tlqU7hsigwIKYHoc7onpnOJkozYAfOcpD/hwJV7Lda+1F uWGBdUUDj/hRA+jkHxzTGwBFTNbcvABQB0O3UVBrAD3qzmMXld92C5A/nyjBs1ubkYMv 2IQ4eNwJHDwDZRJK0v8dlyPtJW7RB8rf9xPtC6Xs8CgAxAXQLy04oJYTuJMVRQ/+p5qY Ia0w==; darn=lists.php.net ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769096019; x=1769700819; darn=lists.php.net; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=2Jm5e2mMWXK5ErSAUpCrY4KjHpoLzDe9vIbRamHQSFU=; b=kH17aO/+QbH4ZRoyLmzUThs1o74Zt+s9ceB1X/N6ApnoON0n4QO/RZ3M/36AqHpdgs yKcKCrVZdTJB1JP7shYzN96TB+FRiGyQi4zScr7FTAO3PNfZWVcT6Yxh9zPNfE0xn+nv 68f6+9uErZ8bIzCNRFdRbgqW1CZoZ67ppfYR0CGN1s6NRp6uGnTm3VSIlFaDjw4lUgbA ie4Ac5QYSR2tZG7nCfFCwhOGXg/VP8YRwe/Qt6LT2rVBqG3cFnH4IQKeQTLPgTSNCXAp fi3vDVlkK3RmsStjcqFiyHt7M9iLUKF+Fs7oWhn7cj/wBYvwKe5xbmUqfW5SxLAjEC/6 rHfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769096019; x=1769700819; h=to:subject:message-id:date:from:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2Jm5e2mMWXK5ErSAUpCrY4KjHpoLzDe9vIbRamHQSFU=; b=fNu/po4PZA5SSozRJUL2F1hmQK+HUvjp3Avh9xznmjlT3ZzwBwXnZ579HwmNn7V8Jp /Fvn0xFLvAk/8ykTudrpUWQIHdfEFpoL+9tmtd9TO9/7lgoqKEUaACX2lCH7Bq80ZO9Z l/PSLenqXrGrLo6YkqunSvq8ozErqKbQrcIIy0XwJ9JIyEowZbMRELf6mGlfAo6hpYf+ 67AXpXqIRU7rQ2V5ckAA3aF02+41HWCoem4MSbgKZf10R1+6xL2NAQs+m2b5WA/4LZ+W qdOgJbQG9ogA7DxAcut7ha/HH/aq+y9LDEJacjKGKRft5BwqdML3+526ZPLmKzHOqAXD NIOg== X-Gm-Message-State: AOJu0YwG0vtiVkhsNN4iCoRBoeeEbP8iVa0sMfQlawv2CvXXGqbm9KDu 9Y4+woiPcvKD3rm4mdeqre3SKQghk3coJqV/1Tp0RT8bpRAgVOVOg/9EMZY62wlueCxGnFZ+azj EZNhMEfIujF8a+XAfJLf59F00lQleqz3iGxa5ntM= X-Gm-Gg: AZuq6aIKMJnN5Ck5YZRCVh8Z49iy8/4Kn2jaLc8NssHQKvuLILwrqgWuJDIHJscIjwt wwg17xPaYcLkGSn7sbj5/8vxXhDbtvh1PDgeGDP6fxsmb7MuK7+JfBWCvNyTwUDCnfQm3hn76xM v87ckK1nx1fhApl5yXwoS9iRinhR3bUc1lnLlGBPFbl030zsDqJfPyRhNdZDFRhCixmGYUtERLS 1B74U0n2+ufY63jSl/DPXcvKpbZpDgSDFyAO2YGEzc/yZvFcz5OeVizzm6D/kSVLQR9PtXXtPuh aGHnpzyixOYXRX4qHhSwMtWjQjqtm6jZR7Qks4iSVCQX17RPak4Nmzf/FA== X-Received: by 2002:a05:620a:191c:b0:8c5:2ce6:dc2 with SMTP id af79cd13be357-8c6a68bdedcmr2934359285a.17.1769096018865; Thu, 22 Jan 2026 07:33:38 -0800 (PST) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Date: Thu, 22 Jan 2026 16:33:27 +0100 X-Gm-Features: AZwV_QiM0wfr_xfXTpxvivdsdld7Pa3JA5hbw36yzyLw5OdrQdqDo297jeYuN1c Message-ID: Subject: [PHP-DEV] [RFC] Allow Reassignment of Promoted Readonly Properties in Constructor To: PHP Internals List Content-Type: multipart/alternative; boundary="000000000000c732c60648fbc3db" From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --000000000000c732c60648fbc3db Content-Type: text/plain; charset="UTF-8" Dear all, Here is a new RFC for you to consider: https://wiki.php.net/rfc/promoted_readonly_constructor_reassign As a quick intro, my motivation for that RFC is that I find it quite annoying that readonly properties play badly with CPP (constructor property promotion). Doing simple processing of any argument before assigning it to a readonly property forces opting out of CPP. This RFC would allow setting once a readonly property in the body of a constructor after the property was previously (and implicitly) set using CPP. This allows keeping property declarations in their compact form while still enabling validation, normalization, or conditional initialization. Cheers, Nicolas --000000000000c732c60648fbc3db Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Dear all,

Here is a=C2=A0new= RFC for you to consider:

As a quick intro, my= motivation for that RFC is that I find it quite annoying that readonly pro= perties play badly with CPP (constructor property promotion).
Doing simple processing of any argument before assigning it to a readonly = property forces opting out of CPP.

This RFC would allow setting once= a readonly property in the body of a constructor after the property was pr= eviously (and implicitly) set using CPP.

This allows keeping p= roperty declarations in their compact form while still enabling validation,= normalization, or conditional initialization.

Cheers,
Nicolas
--000000000000c732c60648fbc3db--