Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122492 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 qa.php.net (Postfix) with ESMTPS id EF05E1AD8F6 for ; Mon, 26 Feb 2024 08:54:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1708937701; bh=Bb64GWkxy2h+Epd2VA2SJ/nkGP55vsOiSLKb/n4GutA=; h=In-Reply-To:References:Date:From:To:Subject:From; b=P0I9ONeZwFfzPi6X1yhFcdAYo8YPosXmslbfHOMhCR/k4xp2uD3TvsOiPF5L2Eh7Y zaaRXzN+Os+hhcZrrJoGLldJ8x9br8hlgOpILh4T2EXKs3BWuxtYznm4cQ12MTLzHy CfX8mulmZCpCpEo3b/N2twOSKGApzTHyGkVt5o1QOK39cdYFTn0c1wxvT9rIRis/2r HJfe5pszezJpIqV3MdceXMZOJ5BE8kYyONMMcdRBek9VjoUPExz4Qcoo7a2+JhlcOA 0P6rN5y1IhNODcVYP2d++385RbAN/6yPughJGzIa9qpboEt0Em6nn3t8xVTTaeLrSZ RHQnYPm2Xx7cA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DD5CE18006D for ; Mon, 26 Feb 2024 08:54:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from wfout7-smtp.messagingengine.com (wfout7-smtp.messagingengine.com [64.147.123.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 ; Mon, 26 Feb 2024 00:54:59 -0800 (PST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.west.internal (Postfix) with ESMTP id 93C5B1C00096 for ; Mon, 26 Feb 2024 03:54:49 -0500 (EST) Received: from imap50 ([10.202.2.100]) by compute6.internal (MEProxy); Mon, 26 Feb 2024 03:54:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rwec.co.uk; h=cc :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=1708937689; x=1709024089; bh=rMKh50Z93W qRyPKRX2kRDkWifz7FB+aT2Zi1Wf9I2wQ=; b=cCVToK8uprVt552R2QEnJBTzJZ xL8x4ahj52qvdXDzJ8p/Fzgvcl4tiu9U5QWUL+Ud3MW6ZMyeRgB1obZXYoeWW/UD 8glax9++7fzykSIU5I4APm/YPywGSbK1pWkK4a2MugT7xOzaoOJEbgmghiuDHT8P qroi3igoEV+k3Gifwh8HTLuTCONN847XNERCBnpw4i4U5mHyLQhrM8q7GL3e4xSb lfpKWHSEC+rNuWcKRcbmbH71fIoSjV1oh06Jp95etqGvSFBCL5Rpj6tl0iMpYY1D m8yC3sHG7BoYSHZ91wS1T7Fx1Expedna2Pjm2WabqfIe+Eiyt2cSrfqv/n4Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1708937689; x=1709024089; bh=rMKh50Z93WqRyPKRX2kRDkWifz7F B+aT2Zi1Wf9I2wQ=; b=gM5HaFs1Pf8RuqlXC5Zrm7T7+3/fxiZHC7QCc5rG4tFM bgYMPlhUkVNtrTRTDBAkANdKMaUrnJs/VSRmuDVycSjNnBDOtSQtqso6i/oD/TL6 l9wzSOcRTmLRT0XziY5fSpYp2/Ok5NAN5zSxjxExMc5yV+O5/ho4xXxnAq9cAm0O kBtl5xC7z+wuxhXELoGzCMlkLlPADpgwlBEeTSiVB5sRmpwyHu+KUkzR/hJ+v8KQ ySMQZIFRbdRsMXxtVF96QefGN0oxfIawvy5eFO6SMABfBQ6R+Qv2eFTG/nFktfqh xbK47PvV7EGs17nleWdPBVUWgAW8FJoPuJBv9u4AhQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrgedugdduvdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtsehttd ertderredtnecuhfhrohhmpedftfhofigrnhcuvfhomhhmihhnshculgfkoffuohfrngdf uceoihhmshhophdrphhhphesrhifvggtrdgtohdruhhkqeenucggtffrrghtthgvrhhnpe dtudeiieffleevtdduteeuffegteevteduueefgfekvdekffeitdfgveeuveehueenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehimhhsohhprd hphhhpsehrfigvtgdrtghordhukh X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id B05791700093; Mon, 26 Feb 2024 03:54:48 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-153-g7e3bb84806-fm-20240215.007-g7e3bb848 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Message-ID: In-Reply-To: <790b5b4e-f51b-4050-a12a-5fa903d0568f@app.fastmail.com> References: <790b5b4e-f51b-4050-a12a-5fa903d0568f@app.fastmail.com> Date: Mon, 26 Feb 2024 08:53:35 +0000 To: internals@lists.php.net Subject: Re: [PHP-DEV] [RFC[ Property accessor hooks, take 2 Content-Type: text/plain From: imsop.php@rwec.co.uk ("Rowan Tommins [IMSoP]") On Thu, 22 Feb 2024, at 23:56, Larry Garfield wrote: > However, I just had a long discussion with Ilija and there is one > possibility we could consider: Use the return value only on the > shorthand (arrow-function-like) syntax. > > So you could do either of these, which would be equivalent: > > set { > $this->phone = $this->santizePhone($value); > } > > set => $this->santizePhone($value); Regarding this point, I've realised that the current short-hand set syntax isn't actually any shorter: set { $this->phone = $this->santizePhone($value); } set => $this->phone = $this->santizePhone($value); It also feels weird to say both "the right-hand side must be a valid expression" and "the value of the expression is ignored". So I think making the short-hand be "expression to assign to the implicit backing field" makes a lot more sense. Regards, -- Rowan Tommins [IMSoP]