Re: [RFC][Vote] Typed Properties

From: Date: Wed, 25 May 2016 17:00:10 +0000
Subject: Re: [RFC][Vote] Typed Properties
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-93516@lists.php.net to get a copy of this message
> > There is a difference between not set and no meaningful value. > In PHP, there's no such difference for properties. And I think we should be consistent with the existing behavior here. > The former is literally unset(), the latter is null. The only semantics > PHP exposes here is that not set can be upgraded to "no meaningful" value > in form of null with a notice. > > The difference thus is quite minor, but semantically important. > Hence to *set* the value, we need to explicitly set null. > > If we don't do it this way, we won't have a way to explicitly *set* > nullable properties to a value (null in this case). (without explicit unset > in ctor). > > Bob

« previous php.internals (#93516) next »