Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129549 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 23AED1A00BC for ; Thu, 4 Dec 2025 16:37:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1764866231; bh=mGyT5ZznkslvaQ3oKF1TC+odcMUAHyNMm12w4s/NgyI=; h=Date:From:To:In-Reply-To:References:Subject:From; b=E5ljelD3U5cRZq8+774bZg/1IUVdsnSPYkrEPVwMKVSvvKnsaas9qsq0gc7+qUiXT iULGIXMHDo1SwoADsbta4EMMF8cUWcAWz5ydAkOITOfV16qqj783YjhRQ0TvbiZERP qKiB1PH3jAWj/gTKfPz8C/QAG+CSpCXMn1eoXE66yD3XFZ65EaeuOgKiOYyxDxn6xP dlda/nC9hDaNPqtsFORZomeW6NJIaBYX3XlKkh4uQUOmbUlei2eYRhudPK7zhGyLtd QMWUZy3jGqbmVNwCM+g13h2KN+o8X9oCejhhQhMT/6cU7BqnlfoMVM6BSWJV2hUz+e 3nNxfp4cY3IaA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id F19F1180080 for ; Thu, 4 Dec 2025 16:37:10 +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.9 required=5.0 tests=BAYES_40,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-a7-smtp.messagingengine.com (fout-a7-smtp.messagingengine.com [103.168.172.150]) (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, 4 Dec 2025 16:37:10 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id 3C6EAEC05A9 for ; Thu, 4 Dec 2025 11:37:05 -0500 (EST) Received: from phl-imap-01 ([10.202.2.91]) by phl-compute-04.internal (MEProxy); Thu, 04 Dec 2025 11:37:05 -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=fm1; t=1764866225; x=1764952625; bh=L4Nwm86iuMrcFIvUNTTIS zvgikkAUFTi5x3Ypgi/mMI=; b=qBzIbp+ejbFBWx8FlgaZ7b78asPzBshZMMjhw 2M05d+f5QolhrdwkdzCOAnPtBkcOIR0/6kRMeVobMdi+ekrCkxDlLBlzgKpXTH55 nw6QI1W5fYmKUfxBfxajuVKRAOv+TIYkmVgXpnapcTuMhPWO5jzf3bkl9oSTYEqj uae8v9WLLKfU4hg7MQpbnthjIJZbB4PFKznWQixpltI+j5Rv1uCTXu5wFf9hEbvO 6d6fP3EKnzSxt/PS0SC2imeVTQUHrnz9X2Kwr60Qn21mgWA2Hx0sP8W18NcGBdpA 7CFoxQidltiC6zkXPbaEnUYbk8WhXNWnS4D83LvrFe5rkHE+w== 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=fm1; t=1764866225; x=1764952625; bh=L 4Nwm86iuMrcFIvUNTTISzvgikkAUFTi5x3Ypgi/mMI=; b=BInonAIoA7n2g0N34 7iAD2lmb7NWhHZUahEzFeOphgP6DcoI60hpUopTw30FPWn1VWJT/0vWE9fmRaLys BqkXaxknk6+rJDvrcClbCnXpmrQoS7cVF3OksfrhQ20QW9rhyksOORRcoXrzoyLI O0nsZXgKAgRUp3LNl41E2L8Hy2w8UYY3WraO2mHTpKC7I0jqCDP4CB34GS2+uR1v A7BqbprltfOnpC5n/NHFHKkPkx7Bof6Yq+vYg1x3cD94CQtITywxN2OPO6iWmLg6 8kg4oU+6qaKaY2RWu/C/dLqHuIYbSnsm21MB50ZRpDKF061TAOfGCVbdTaraec64 laCtg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdeitdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurh epofggfffhvffkjghfufgtgfesthhqredtredtjeenucfhrhhomhepfdfnrghrrhihucfi rghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhmqeenuc ggtffrrghtthgvrhhnpeeugfetieejueevffdulefhhfethfekvedtueevgfffvdefiedv tefgheevteelffenucffohhmrghinhepphhhphdrnhgvthenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlught vggthhdrtghomhdpnhgspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtg hpthhtohepihhnthgvrhhnrghlsheslhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id CE92518C0066; Thu, 4 Dec 2025 11:37:04 -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: AboHCY4z1pNF Date: Thu, 04 Dec 2025 10:36:43 -0600 To: "php internals" Message-ID: In-Reply-To: References: Subject: Re: [PHP-DEV] [RFC] isReadable/isWriteable property reflection Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: larry@garfieldtech.com ("Larry Garfield") On Thu, Dec 4, 2025, at 8:05 AM, Nicolas Grekas wrote: > Le jeu. 6 nov. 2025 =C3=A0 00:28, Larry Garfield a =C3=A9crit : >> In other news, Ilija and I said a year ago that we'd take a swing at = adding isReadable/isWriteable methods to ReflectionProperty. Took a whi= le, but here we are. A strangely small RFC from us: >>=20 >> https://wiki.php.net/rfc/isreadable-iswriteable >>=20 > > > Thanks for this. > I also think the auto-scope is [NOT] a good idea. You state that 90% o= f use=20 > cases will need this but my experience doesn't back this claim. The=20 > only cases where I had to check for read/writeable were out of the=20 > local scope, so I'd say 100% of my experience goes against that 90%=20 > number ;) Joke aside, it'd be just fine to let ppl be explicit. That's=20 > better than "oops I forgot to give the correct scope" bugs. > > About magic methods, one unsets a property only to have __get/__set=20 > called. Existing code works with this assumption. This means we have t= o=20 > return true IMHO. Magic methods are just generic hooks also. Which=20 > means they should behave the same. > > Nicolas Well, the only people who seem to have an opinion don't like "static", s= o we've removed it. RFC updated. As for __get/__set, that's so far one vote for ignore (Tim), and one for= always-true (Nicolas). Not a consensus. :-) Nicolas, can you clarify with an example if/how ignore would break thing= s? =20 I think once we settle that question and the cooldown passes we're ready= for a vote, though at this point that means January. --Larry Garfield