Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120297 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 99296 invoked from network); 15 May 2023 18:46:04 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 15 May 2023 18:46:04 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id ABF5C18054A for ; Mon, 15 May 2023 11:46:03 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS19151 66.111.4.0/24 X-Spam-Virus: No X-Envelope-From: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 15 May 2023 11:46:03 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id E19715C02D5 for ; Mon, 15 May 2023 14:46:02 -0400 (EDT) Received: from imap50 ([10.202.2.100]) by compute4.internal (MEProxy); Mon, 15 May 2023 14:46:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-type:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1684176362; x= 1684262762; bh=mRw+ZNIKillGASPaQG1PRhHrMqy4A5JQHxbh/rq06tM=; b=j IswoI/+t5VxqReqdUHQvNhYfvWvR0gxFIe93Gb5s8j6FN0QhPwrNnvVO/NDEtijH +b5J+4t6XQ8p/p7DbutFu9Ij8CiQBmml1n4kYEiDWevRoMpT5BSR06ojNsxneVjQ HgFCAUbiVlVzD5N0JRhC2R9f0W/JAuv7fkOSs8V+g5gN31dF+jr9faHcOdMS7fQc 41tgducuikrSm8BlxyDjgBpmYDQH9pdLJEnwJrm49PI+6YDeAeq4uDX9pM/Fwzd0 Oho4eWr+1dF2RTpnyoLUIz2VVhRPDCmiulEj7YMrhCwVJWHDkceFu5HPbGUdpGFV xbTBv7bMvQFrfhF65JbrA== 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:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1684176362; x=1684262762; bh=mRw+ZNIKillGA SPaQG1PRhHrMqy4A5JQHxbh/rq06tM=; b=mHH8zSk5qT5wZQ8zgDyVr+7Mw6ry3 K6xMxuBfQ78Vvrp2itywQVQoZBVBkHb5GprLBfiix5y4Yh6eGD0ojnqaW+etnhhj AGcjuVSyKltRAXb0upszHpAIvChHDR+SIKKr+z3F7LWylGMXKaJxLK/mVXJWzpGq bOjoWwQShc8jbkrxttltIxYAuabLYltJXG48HLa41qIFVabfQcgVpdhCPzM9g6Xt mTygIV5pf9W/Wb9L60wfnonxeard3ALQX9ztmK5eJx2zkLuHBbr9M6kAPa9xRen3 NnQpyUZwSzoIBJ7JFwVAefzKcqUtj4nfqu2hqAVb51qXDB2X+LfbuyE4Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeehjedgudefudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfnfgr rhhrhicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtg homheqnecuggftrfgrthhtvghrnhepgeelgfekudeivddvteffueejffdthfejieevhefg ffekudevkedtvdelvddvffefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtohhm X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 903A31700090; Mon, 15 May 2023 14:46:02 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-415-gf2b17fe6c3-fm-20230503.001-gf2b17fe6 Mime-Version: 1.0 Message-ID: In-Reply-To: References: <641b1ca0-d33f-4f38-ae64-81b4abce24da@app.fastmail.com> Date: Mon, 15 May 2023 18:45:37 +0000 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] [RFC] Property hooks, nee accessors From: larry@garfieldtech.com ("Larry Garfield") Missed one... On Mon, May 15, 2023, at 8:14 AM, Hendra Gunawan wrote: > Can the engine detect these logical errors? > ``` > public string $fullName = "hendra gunawan" => $this->first . " " . $this->last; > > // or with my proposal: > public string $fullName = "hendra gunawan" get => $this->first . " " . > $this->last; > > // or even this one: > public string $fullName = "hendra gunawan" { > get => $this->first . " " . $this->last; > set => [$this->first, $this->last] = explode(" ", $value); > ``` > > Explanation: > There is no automatic backing store value created to store the default value. > > Terima Kasih. Those would be compile-time syntax errors, yes. (Or possibly link time, if inheritance is involved, but still before execution time.) --Larry Garfield