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 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php