On 5/25/2016 10:23 PM, Benoit Schildknecht wrote:
> Le Wed, 25 May 2016 21:40:28 +0200, Fleshgrinder <p...@fleshgrinder.com>
> a écrit:
> 
>> and unset simply because the property is not
>> explicitly assigned null by unset, it is being undefined.
> 
> 
> Because null !== undefined. That's why you get an error after an
> unset($this->var), and you don't get one after $this->var = null; .
> "$var = null;" and "unset($var)" are totally different, it has been like
> that for years. If you want to change this behavior, propose an RFC, and
> make it approve. But meanwhile, you'll have to keep this in mind :
> "null" is a value. While "unset" does not affect a value, it deletes the
> variable, it deletes any references of the variable it targets, the
> variable doesn't exist anymore. With unset, the variable is dead. With
> null, it has amnesia. I can't find any better analogy.
> 

Which is exactly what I wrote and think is correct. ;)

-- 
Richard "Fleshgrinder" Fussenegger

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to