On Tue, Jun 25, 2024 at 2:29 AM radar3301 wrote:
> I'm looking for initial feedback on the following proposal.
>
> Often, we have the following (fluent interface) setter method:
>
> public function setName(?string $name): static
> {
> $this->name = $name;
>
> return $this;
> }
>
> I propo
properties. Fighting the "uninitialised" is
something big that we may try to discuss in another thread.
We have to deal with this state and a syntax to reliably check
those invalid properties will be helpful.
Something like "$objectVar->property is uninitialized" will be
awesome.
Luigi Cardamone
cases where you
can check if the property is initialised
or not and for consistency "null" should
be considered a valid initialization value.
Are there any downsides in adding a
specific syntax to check if a property
is initialized with any value?
Thank you.
Luigi Cardamone
Backend devel
uage syntax like
"is_initialized($dto->propA)" can be an interesting solution?
Thank you in advance.
Luigi Cardamone
Backend developer
Italy