Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93547 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70266 invoked from network); 25 May 2016 22:41:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 May 2016 22:41:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=mails@thomasbley.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=mails@thomasbley.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain thomasbley.de from 85.13.128.151 cause and error) X-PHP-List-Original-Sender: mails@thomasbley.de X-Host-Fingerprint: 85.13.128.151 dd1730.kasserver.com Received: from [85.13.128.151] ([85.13.128.151:44301] helo=dd1730.kasserver.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 93/F1-14311-B1A26475 for ; Wed, 25 May 2016 18:41:31 -0400 Received: from dd1730.kasserver.com (dd0800.kasserver.com [85.13.143.204]) by dd1730.kasserver.com (Postfix) with ESMTPSA id 7798C1A8024F; Thu, 26 May 2016 00:41:28 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-SenderIP: 95.91.244.236 User-Agent: ALL-INKL Webmail 2.11 In-Reply-To: <20160525223805.E83B71A8024F@dd1730.kasserver.com> References: <20160525215208.034FC1A801B3@dd1730.kasserver.com><57462386.40204@lsces.co.uk><20160525223805.E83B71A8024F@dd1730.kasserver.com> To: internals@lists.php.net, lester@lsces.co.uk Message-ID: <20160525224128.7798C1A8024F@dd1730.kasserver.com> Date: Thu, 26 May 2016 00:41:28 +0200 (CEST) Subject: Re: [PHP-DEV] [RFC][Vote] Typed Properties From: mails@thomasbley.de ("Thomas Bley") Of course isset() has a special behaviour. So having some kind of real_isset() or initialized() would be nice. Regards Thomas Thomas Bley wrote on 26.05.2016 00:38: >>> var_dump($a->z); // 0 + notice >> The notice should be 'variable does not exist' as at this point $a->z >> has no context at all! > > If we keep the private flag of a property after unset(), we should also keep > the type of a property after unset(), e.g. > > class test { > private $z = 42; > > public function __construct() { > unset($this->z); > } > } > $a = new test(); > $a->z = 21; // fatal: Cannot access private property... > > So after unset, $a->z should still have context. > > Regards > Thomas > > Lester Caine wrote on 26.05.2016 00:13: > >> On 25/05/16 22:52, Thomas Bley wrote: >>> var_dump($a->z); // 42 >>> var_dump(isset($a->z)); // true >>> unset($a->z); >> $a->z does not exist at this point >> >>> var_dump(isset($a->z)); // false >> We know that isset is broken so if $a->z is null we also get false ... >> perhaps the 'fault' that isset does not actually work properly is >> biting? But since $a->z does not exist false avoids an error. >> >>> var_dump($a->z); // 0 + notice >> The notice should be 'variable does not exist' as at this point $a->z >> has no context at all! >> >> -- >> Lester Caine - G8HFL >> ----------------------------- >> Contact - http://lsces.co.uk/wiki/?page=contact >> L.S.Caine Electronic Services - http://lsces.co.uk >> EnquirySolve - http://enquirysolve.com/ >> Model Engineers Digital Workshop - http://medw.co.uk >> Rainbow Digital Media - http://rainbowdigitalmedia.co.uk >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >