Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93545 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66603 invoked from network); 25 May 2016 22:17:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 May 2016 22:17: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:43353] helo=dd1730.kasserver.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D9/31-14311-A7426475 for ; Wed, 25 May 2016 18:17:30 -0400 Received: from dd1730.kasserver.com (dd0800.kasserver.com [85.13.143.204]) by dd1730.kasserver.com (Postfix) with ESMTPSA id 9A5A11A80649; Thu, 26 May 2016 00:17:27 +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 To: ajf@ajf.me, internals@lists.php.net, smalyshev@gmail.com Cc: ocramius@gmail.com, bensor987@neuf.fr, me@kelunik.com Message-ID: <20160525221727.9A5A11A80649@dd1730.kasserver.com> Date: Thu, 26 May 2016 00:17:27 +0200 (CEST) Subject: Re: [PHP-DEV] [RFC][Vote] Typed Properties From: mails@thomasbley.de ("Thomas Bley") Currently the rfc also checks the properties for being initialized. I think it's still faster than most userland implementations using __get() for type checks and parsing phpdoc for type information. Regards Thomas Stanislav Malyshev wrote on 25.05.2016 23:56: > Hi! > >> var_dump($a->w); // Fatal error, uninitialized... > > This means every read access to a property should be checked for it > being typed, and every access to a typed property should be checked for > it being initialized. I'm concerned there might be a performance hit for > this. > > Also, this means no access for a property - even defined one - is safe, > and if you want to avoid fatal errors, you need to check every access, > at least if you suspect typed properties may be involved. And, of > course, there's no function in the RFC to actually check it. > -- > Stas Malyshev > smalyshev@gmail.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >