Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120282 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 46704 invoked from network); 15 May 2023 09:15:56 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 15 May 2023 09:15:56 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2D7581804D7 for ; Mon, 15 May 2023 02:15:56 -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=-0.7 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 15 May 2023 02:15:55 -0700 (PDT) Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-3062d33b5ccso2176731f8f.1 for ; Mon, 15 May 2023 02:15:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684142154; x=1686734154; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=k6NO1Chk7xrFYPWHli+99vsMSPnnKT/DxQ3up4C9y/Q=; b=H2reJVX6j6RQ+eBmzE168i20uPnx5H7rKIvPRLBVB70Es3SJYw4tpv66UmiWGdNCbn WhfZKkXFbtpjI+bIS5sP6ggsFHPNfhNbvCXgqrs4HJ9m9Ea11a25LK8rralnC8Hs9FIa 3xPR+9hpPi3KVZdOuFJGWoEhVPdXQE0eiHsRkHyyvZkM/f22b02g3ZW8kA/icjTGm6ag qzgpc0gE8HUrFgLskn79a5RmZrBa6S3iPNj3VJ4yTNF/WqIy40xML4w3UYj+Rjseabjm CZFjDqow/+GdcQMi1r9XyYb4IVvT+kHmYHxzn/Vc/9t3gLnrnCHSaL9jair3gJxwCDUY Cjug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684142154; x=1686734154; 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=k6NO1Chk7xrFYPWHli+99vsMSPnnKT/DxQ3up4C9y/Q=; b=NhzURvq5qILHqxkMMq5oN40HfDuqQSdLTDZshpAtujT5bSluKyW8WIS1YzdDNlxLeC ucQcJ7e5RGBryxssVPeOXXXGhoHLW9QhvW3A13iwyksadETGNhMW5oeeHf1z0s3jOugy vAvTnQIoZrCA+wF2s/tWQvr+a0zyQFMrxkehQqzpRn3uAUrrpiFGwgfE+aDSvRXvDsce vp2X8nAvAuTTJm2VxkCwD6svuvw1B14RABN/+LLBOI/YHQGCJcx8jcVUUll3wvNmvGam HUHvohAl98p06iOMAZg72r/iSI2G1mXzm5zBy98hEsik2MEAE0HWoYqX7JGnt9uFGtEz biHA== X-Gm-Message-State: AC+VfDwoCrUOJ0shd5q3LdyrX1etFwKFdR6/8vdvA3IFIFO/h0xP6EMG SXGIhrQ8FyrGSTAA27kmH+NNu/TnrtU3me0XiV5uxBkIg8fnAQ== X-Google-Smtp-Source: ACHHUZ5d7Vo0nbB4MKCOLbrQqliHNN/3edtB4lC+Fp85TWVwqj8qi//KybroTfho13PZtGA6LZ+Q2JqFZxsUFBSDCbk= X-Received: by 2002:adf:e60e:0:b0:307:5561:5eea with SMTP id p14-20020adfe60e000000b0030755615eeamr19955684wrm.0.1684142154211; Mon, 15 May 2023 02:15:54 -0700 (PDT) MIME-Version: 1.0 References: <641b1ca0-d33f-4f38-ae64-81b4abce24da@app.fastmail.com> In-Reply-To: Date: Mon, 15 May 2023 16:15:42 +0700 Message-ID: To: Lynn Cc: Larry Garfield , php internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC] Property hooks, nee accessors From: the.liquid.metal@gmail.com (Hendra Gunawan) > ```php > class User { > private string $first; > private string $last; > public string $fullName { > get => $this->first . ' ' . $this->last; > set => [$this->first, $this->last] = explode(' ', $value, 2); > } > > public function __construct($this->fullName) {} > } > ``` Not entirely true, you created redundancy code for ```$fullName```. This is why we created constructor property promotion: to eliminate redundancy.