Andrea Faulds <a...@ajf.me> schrieb am Mi., 25. Mai 2016 19:14:

> Hi Niklas,
>
> Niklas Keller wrote:
> >>
> >> 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.
>
> That's not quite true, unset properties produce a notice when accessed,
> properties set to null do not, and it is possible to check whether a
> property is set or not versus just null. Likewise with variables, array
> members, etc.
>

We're talking about two different things. Once it's the default value after
declaring it with private ?Type $foo and on the other hand the behavior
after unser. IMO the first should default to null while unsetting a typed
property should fail.

Thanks.
>
> --
> Andrea Faulds
> https://ajf.me/
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Reply via email to