Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120279 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 37904 invoked from network); 15 May 2023 08:14:44 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 15 May 2023 08:14:44 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7DC79180382 for ; Mon, 15 May 2023 01:14:43 -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.1 required=5.0 tests=BAYES_00,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-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (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 01:14:43 -0700 (PDT) Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-3062d33b5ccso2163179f8f.1 for ; Mon, 15 May 2023 01:14:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684138481; x=1686730481; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=WofJXWiFbb6rXA6o8cHqWzKtuLHGR+D9uNJOSCeHNsg=; b=BLMski/X8l8g9PtzaT36mqzsbbkFfB3pZZfZqJ8SsjehfM5L9lG8L2UD0f4oz85uPD vbDQG8UMGQnnbT12s6l7/n1qiFyHLsMuECE88lh/5Qu9quSUIx5Gsb4ER5VtvsP/H+r1 TIY3qHmlERu8j+4ttUm6sr0Dg6XTcaKEn0ipl71finTTqHpZmaVIwxB+EKnQq7fOKLyg Y5ukzrSqpjNXZuZGeCfpldiUtyn7ag3c6SM/qx43A4ql8JBvqTwkQSO2fV6zLVI9oNSq jdzCx1csp7t93EzzSC8BIeVKw41Zetj2RWJsYj42pOh4e1Ln7uHbTb7WcKEJ/G9CBuYI bEnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684138481; x=1686730481; h=content-transfer-encoding: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=WofJXWiFbb6rXA6o8cHqWzKtuLHGR+D9uNJOSCeHNsg=; b=Wp9hHgn1jJzbVHOQYZ8jlvUQreCRPWw9zOnXoxJlCRGtia8afU5lNW0WOw5/YD2hhT HEuDADmH2J1TO+fnq7mp+6CeCnpzrU3IQHjiFCffnNhYf+PfglP/pwMKS6OF4NkCZNrz gPMd+9HYEAuC0BTV5E4LiqTCvUqGG43HP/KC31XJYuIJT3blg2Eqs1EJEmO7rqZfCe9T Ru5+zkxXaKvTXGhkbpj1Ow8yahdYF3OZ8Ng/Blj6bc/YTFPLXt7ZTldID2R7iR/ee1q/ HVydirGLa4xr0zWVX2wwTBeJXFxFOzGuxaYuAK9dttOFGlHCWhT66VZ6D8eJMCVqgXlG lPKg== X-Gm-Message-State: AC+VfDzMFx5GIHqilwjGx2FKV21QqAbJEbngzOglJFaH6Els5qIvaGsp 19xg1qMF9XIZ/NpyRj9PeFI5twLt/gUw/g8l7ql3mTF37OPkwQ== X-Google-Smtp-Source: ACHHUZ4adkIoFHuoYID+Ou37F7kZtIQIkFdOGORm26IXQCPvQ5njgnZlqTVJGGSxrlT9ykGhJNVags9hNnCFJ/XShVc= X-Received: by 2002:a5d:4d0a:0:b0:2f8:28e7:13e8 with SMTP id z10-20020a5d4d0a000000b002f828e713e8mr16403381wrt.6.1684138481384; Mon, 15 May 2023 01:14:41 -0700 (PDT) MIME-Version: 1.0 References: <641b1ca0-d33f-4f38-ae64-81b4abce24da@app.fastmail.com> In-Reply-To: <641b1ca0-d33f-4f38-ae64-81b4abce24da@app.fastmail.com> Date: Mon, 15 May 2023 15:14:29 +0700 Message-ID: To: Larry Garfield Cc: php internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Property hooks, nee accessors From: the.liquid.metal@gmail.com (Hendra Gunawan) On Tue, May 9, 2023 at 4:38=E2=80=AFAM Larry Garfield wrote: > > Ilija Tovilo and I would like to offer another RFC for your consideration= . It's been a while in coming, and we've evolved the design quite a bit ju= st in the last week so if you saw an earlier draft of it in the past few mo= nths, I would encourage you to read it over again to make sure we're all on= the same page. I'm actually pretty happy with where it ended up, even if = it's not the original design. This approach eliminates several hard-to-imp= lement edge cases while still providing a lot of functionality in one packa= ge. > > https://wiki.php.net/rfc/property-hooks > > -- > Larry Garfield > larry@garfieldtech.com Hi Larry Can the engine detect these logical errors? ``` public string $fullName =3D "hendra gunawan" =3D> $this->first . " " . $thi= s->last; // or with my proposal: public string $fullName =3D "hendra gunawan" get =3D> $this->first . " " . $this->last; // or even this one: public string $fullName =3D "hendra gunawan" { get =3D> $this->first . " " . $this->last; set =3D> [$this->first, $this->last] =3D explode(" ", $value); ``` Explanation: There is no automatic backing store value created to store the default valu= e. Terima Kasih.