Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128113 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 092181A00BC for ; Fri, 18 Jul 2025 14:50:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1752850150; bh=Db76pqhu1ej01jCS7PdbEFUdzgU4YrsR/Kur8/qeTBI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=jlmK1NFIZsd48uTOnb52O0fWSQo0/H7cimdFu4b93eJx05oLy3vEkoLSZYWnTI1eu lkLPNEVAcjGcK7GpaQEspmCuHz6BhysR6VJKBMIaFXgpWiENVFRimSKZK9lwPuDgNz rnVU7WxAsxNVBEtyg5TH19KqX2xYCkTF2FKIwETersTno2+hraaXhdY8YBrHwqVQlo 9pIDE7BXWpsownnMQxrGCrYlOly+1PXe383BO2nJvPzPIuvnqsxM6PFiF3NRewMlBC KxdttxDr2D1YEZVsg6Bj2Ey/K/cs6mzZCHi3++g6kMpnxr7hAmYCTzEPypAAMMC3R1 6SV2cS7vKCCQg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4D9E518004D for ; Fri, 18 Jul 2025 14:49:09 +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.4 required=5.0 tests=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: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) (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, 18 Jul 2025 14:49:06 +0000 (UTC) Received: by mail-pg1-f171.google.com with SMTP id 41be03b00d2f7-b34a71d9208so1544568a12.3 for ; Fri, 18 Jul 2025 07:50:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1752850252; x=1753455052; 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=Db76pqhu1ej01jCS7PdbEFUdzgU4YrsR/Kur8/qeTBI=; b=gB628V2yvvp5TY/eZZjqz7/KvpESbN7k1MPRCg7GoZMq+/hXgs/CZdUy697tnW9yjo tsIIECRabWwzkWKhIYFgzLhtvDU9JER79Yqnic25Z0kRU7ZjskMVgz8kxAaVWdFW9GKW EhA/3ux8TFA8BprSZef1/WU0+9Xi4l6YRKRDwiVaO/+A5W9+sl3PO6OJ9ygSC5X79TRN j1HIrVrskzB9A7qt34/L/rmn7QuySRbpVlXKLuoQYxxzx5+wZ75GHtxTUzQajr/vlYq8 f/aaPmba+mVXZqQNQ/H8GDtIFnXQZPukBjtga53re1nO+m5fiOsz3iGOGP1iBgpkWHz2 BoGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752850252; x=1753455052; 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=Db76pqhu1ej01jCS7PdbEFUdzgU4YrsR/Kur8/qeTBI=; b=IgsH9dZfXq64zl02aLYhaiix9x1+nUSvX2rJl722k//zhMPrnyGQnGXdH4okTWVT/d NXYG0Mb7EBugtroOsg5VhtXfLYkcvPHbY2WyYjrcjc2RD8qgBUYpgTDVrqHTC2SIl44D nJdjcT5KkAydUWZwps2ahmep8wRTCBF9v2vEeEtyURjicl+z4GjvJQM4hvsPoxNzioUo W4PomP1eAmwVhK3xum/m57XifH948m+S6xvN0+15zKxzUt0hQ2xcjM4fu7Nsl7joG7mX GJTJL95MgOV2MoHY/ki741IfHZJ/f/r2rvbK6uJHFbduaIXal7+MTLH+HuZ0JZ6LHRQF Qpog== X-Forwarded-Encrypted: i=1; AJvYcCVupHH2CJh2mgvHhdxyJbTakFfIc39HXqhon1EKw8juQxPBRBWrG3pNx0BB5Dhr81v/vjrLKmJzRfM=@lists.php.net X-Gm-Message-State: AOJu0Yznrrul0LkMW7Mbo3WxJRyIHHd7E5jXcWanE4HuF2G4p1ITDMlT 7IHcm2GuRoR2uL3LOAyvPWnsYkf94k2tVLRoT/xAeIQ/fYpWIT6jwLXzCc1/pGEaqhCjSkXIumj eVsBiPC15PJ1wjE6xs6tFopACiOW1Tcl/o9s8 X-Gm-Gg: ASbGncvMB4ww78gclj0cQRF6AMiDSdxZBjT1B1r9mxEqnxzjT+cVl87BdjXovKHD5Bf rAutEBnHfgYRX/MPWobYqYkhIR+aHclsYpePaSiFkQ0adq9cwa9TROfNy/OZgSjK/bWrrIMR6IJ nQZGd9AGD8wY+mkmFQ2s7//+YbwtVX4Qo33cGbydfuip1w3x+17A31Sd6HLtbVguijn93chy/S0 Wk0Kt/08BVkSptwX9Q= X-Google-Smtp-Source: AGHT+IEx3eJjdYvpU6/nu3VQEsh2Bb2z4nxDPFj3VMtkylPjjWC6FulMXIPDteKLUIRBrxrjvBtUQp0lLgFuq3H26Jk= X-Received: by 2002:a17:90b:1fc7:b0:311:df4b:4b82 with SMTP id 98e67ed59e1d1-31c9f45e1afmr17107091a91.4.1752850251570; Fri, 18 Jul 2025 07:50:51 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 References: <1e8634d7-ac1a-4025-b4e2-1948aabf5251@app.fastmail.com> <46857A6D-5EAF-44AF-A2DE-9B40AF8DE8C8@gmail.com> <41241c3d-a601-4fb8-9f32-976bea3b660e@app.fastmail.com> <308e51e9-ebc9-4ab1-a727-46854b27701f@bastelstu.be> <93a7a354-9779-4c2d-a146-a49388bc0159@bastelstu.be> In-Reply-To: <93a7a354-9779-4c2d-a146-a49388bc0159@bastelstu.be> Date: Fri, 18 Jul 2025 16:50:39 +0200 X-Gm-Features: Ac12FXy5BCmcV0iAdFGuWj_wOIcdpXI8LP4Y9YGureHdJ8FWkzOh4mliXidTwI8 Message-ID: Subject: Re: [PHP-DEV] [RFC] Readonly property hooks To: =?UTF-8?Q?Tim_D=C3=BCsterhus?= Cc: Faizan Akram Dar , Larry Garfield , php internals Content-Type: multipart/alternative; boundary="00000000000096e5a0063a354075" From: ocramius@gmail.com (Marco Pivetta) --00000000000096e5a0063a354075 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, 18 Jul 2025 at 16:43, Tim D=C3=BCsterhus wrote: > On 7/18/25 16:25, Faizan Akram Dar wrote: > > The problem with allowing only set hooks is that readonly class won't b= e > > compatible with hooks, I think that is one of the main motivations behi= nd > > this RFC. > > Yes. The point is that the semantics users expect from `readonly` are > fundamentally incompatible with a get hook that could return arbitrarily > changing values whenever you read from a property. Just a heads up: I also plan to vote "no" on this RFC because the expectation with `readonly` is that there is no kind of interference or lazy initialization anyway. Now that lazy proxies have landed into core, there is also no need for `__get` hacks anymore. Marco Pivetta https://mastodon.social/@ocramius https://ocramius.github.io/ --00000000000096e5a0063a354075 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
--00000000000096e5a0063a354075--