Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93528 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38627 invoked from network); 25 May 2016 20:23:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 May 2016 20:23:35 -0000 X-Host-Fingerprint: 92.170.143.247 LFbn-1-4403-247.w92-170.abo.wanadoo.fr Received: from [92.170.143.247] ([92.170.143.247:7567] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4A/5B-14311-6C906475 for ; Wed, 25 May 2016 16:23:34 -0400 To: internals@lists.php.net Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes References: <80.72.63510.DAFA5475@pb1.pair.com> <68fd73e7-ad19-3758-7b7a-6013cc26385f@gmail.com> <11.87.14311.EC5E5475@pb1.pair.com> <46620281-18af-094f-d484-8fc69bd7dc11@gmail.com> <557bd7db-b400-73b8-835d-6a03396f7fb5@fleshgrinder.com> Date: Wed, 25 May 2016 22:23:28 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: Quoted-Printable Message-ID: User-Agent: Opera Mail/1.0 (Win32) X-Posted-By: 92.170.143.247 Subject: Re: [PHP-DEV] [RFC][Vote] Typed Properties From: bensor987@neuf.fr ("Benoit Schildknecht") Le Wed, 25 May 2016 21:40:28 +0200, Fleshgrinder = a = =C3=A9crit: > and unset simply because the property is not > explicitly assigned null by unset, it is being undefined. Because null !=3D=3D undefined. That's why you get an error after an = unset($this->var), and you don't get one after $this->var =3D null; . "$= var = =3D null;" and "unset($var)" are totally different, it has been like tha= t = 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, i= t = 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.