On Tue, May 9, 2023 at 4:38 AM Larry Garfield <la...@garfieldtech.com> 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 just in > the last week so if you saw an earlier draft of it in the past few months, 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-implement edge > cases while still providing a lot of functionality in one package. > > https://wiki.php.net/rfc/property-hooks > > -- > Larry Garfield > la...@garfieldtech.com
Hi Larry 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. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php