Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92742 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65597 invoked from network); 25 Apr 2016 17:18:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Apr 2016 17:18:01 -0000 Authentication-Results: pb1.pair.com header.from=kontakt@beberlei.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=kontakt@beberlei.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain beberlei.de from 74.125.82.46 cause and error) X-PHP-List-Original-Sender: kontakt@beberlei.de X-Host-Fingerprint: 74.125.82.46 mail-wm0-f46.google.com Received: from [74.125.82.46] ([74.125.82.46:38731] helo=mail-wm0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D7/FB-00233-7415E175 for ; Mon, 25 Apr 2016 13:18:00 -0400 Received: by mail-wm0-f46.google.com with SMTP id u206so138400274wme.1 for ; Mon, 25 Apr 2016 10:17:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beberlei-de.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=5jwAxaNr/6pzuEuej6qL1zmi6R2q/pgaoju7tVrJ1Ls=; b=Oox/CCDpaNL4sbP+1ipHqojAnURNxJWRXuzfyvACCK0q4n4IhGh8soc8Jp/50wuVVr JmemxMFJlleZhhjWT7PekgDHZ+F1z5UOZmrrt/ZDk0itaA8Eu864tLjj8pu1fcBH7Kdo wVBG+esxzNb6qKEoDLVsrIRVBZbvtz/hc/byf9ZalhkhgG/qwChaSd9ldnJ1R18rvjWS ZImeKktA0n98s5aD1i23XL4S6O0z5g+H6Tjm2mz71o26b78lmwSVkCYto+M0GE2mW/M4 XMKJ7LVOb0t4v8b9jwnYxxCM7vrItOQbN2qPUrlb7DyLyJ8YS4Dzdy25Tsy6O4u1b3Uj 3GBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=5jwAxaNr/6pzuEuej6qL1zmi6R2q/pgaoju7tVrJ1Ls=; b=Lvz+enNgjNyiGONLjgqzE95c30fOo3WgtoXZ7uSUMx8M37BRr6czIlryEgl3wpMfR0 RbeQfJTvOklzrEoGCsVgiz7Unzp/O+pJQLzlSN6ykFwf+5VxVuj8khZi3tXE9VWhJxvR N811vsR5YbNxTvRj6eqsLSIsxHneBjxtWqKgShYFLT/gdik2oTibCWZQIHRBSlbwIl72 YpstLzeHW50HHYnwaqKbAPizi832ZKEGzbIFIv6DkFiz7Ig3RCYa/6bA68HfAE3JCPdJ 4b3WNGK09827G11P4kmyYX3G522F6MkCrn4Dj8JX/PgaZvXxIztUhLmLOro69aQwlust dqjw== X-Gm-Message-State: AOPr4FVu54gz5eDT03Yz/xbMqJufUIshLRBcQrs6u3GxkbWv/D3pIEUtyKfqEUDHB1G43lSuxk8JN22Io133FA== MIME-Version: 1.0 X-Received: by 10.194.116.9 with SMTP id js9mr41613485wjb.112.1461604677235; Mon, 25 Apr 2016 10:17:57 -0700 (PDT) Received: by 10.194.94.163 with HTTP; Mon, 25 Apr 2016 10:17:56 -0700 (PDT) X-Originating-IP: [93.129.168.204] In-Reply-To: <571E4FC6.9000602@gmail.com> References: <571965D1.9020102@zend.com> <5719CDB2.90103@zend.com> <571DCA6A.2070803@zend.com> <571E4FC6.9000602@gmail.com> Date: Mon, 25 Apr 2016 19:17:56 +0200 Message-ID: To: Rowan Collins Cc: PHP Internals Content-Type: multipart/alternative; boundary=001a1130d21896d2380531525bc0 Subject: Re: [PHP-DEV] [RFC] PHP Attributes From: kontakt@beberlei.de (Benjamin Eberlei) --001a1130d21896d2380531525bc0 Content-Type: text/plain; charset=UTF-8 On Mon, Apr 25, 2016 at 7:11 PM, Rowan Collins wrote: > guilhermeblanco@gmail.com wrote on 25/04/2016 15:22: > >> Another thing that looks odd to me i that every time you call new >> ReflectionClass, a new reflection_object gets created. >> Isn't there a way to get this "cached" somehow in zend_class_entry? >> > > I recently came upon a package that exists solely to work around this: > https://packagist.org/packages/fsi/reflection > > I am reminded of the fact that people often say "reflection is slow, use > it with care". Is this still the case? Does this limit the usability of > attributes as proposed? No its not slow, if you don't create Reflection* instances all the time. In Doctrine we cache this per class and only do it once. Guilherme came up with the why the object references are not reused on IRC, because setAccessible could otherwise produce side effects to other instances. So this actually makes sense. > > > Regards, > -- > Rowan Collins > [IMSoP] > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --001a1130d21896d2380531525bc0--