Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57406 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31917 invoked from network); 18 Jan 2012 10:35:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jan 2012 10:35:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=glopes@nebm.ist.utl.pt; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=glopes@nebm.ist.utl.pt; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nebm.ist.utl.pt from 193.136.128.21 cause and error) X-PHP-List-Original-Sender: glopes@nebm.ist.utl.pt X-Host-Fingerprint: 193.136.128.21 smtp1.ist.utl.pt Linux 2.6 Received: from [193.136.128.21] ([193.136.128.21:41977] helo=smtp1.ist.utl.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C3/22-21653-F70A61F4 for ; Wed, 18 Jan 2012 05:35:44 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp1.ist.utl.pt (Postfix) with ESMTP id E0A467000456 for ; Wed, 18 Jan 2012 10:35:40 +0000 (WET) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at ist.utl.pt Received: from smtp1.ist.utl.pt ([127.0.0.1]) by localhost (smtp1.ist.utl.pt [127.0.0.1]) (amavisd-new, port 10025) with LMTP id 1qqV1VPOyZ9a for ; Wed, 18 Jan 2012 10:35:40 +0000 (WET) Received: from mail2.ist.utl.pt (mail.ist.utl.pt [IPv6:2001:690:2100:1::8]) by smtp1.ist.utl.pt (Postfix) with ESMTP id A6FD47000451 for ; Wed, 18 Jan 2012 10:35:40 +0000 (WET) Received: from slws007.slhq.int (a82-161-209-109.adsl.xs4all.nl [82.161.209.109]) (Authenticated sender: ist155741) by mail2.ist.utl.pt (Postfix) with ESMTPSA id 3E20A202257C for ; Wed, 18 Jan 2012 10:35:40 +0000 (WET) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: internals@lists.php.net References: <4F15F47E.6030501@sugarcrm.com> Date: Wed, 18 Jan 2012 11:35:37 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Organization: =?utf-8?Q?N=C3=BAcleo_de_Eng=2E_Biom=C3=A9di?= =?utf-8?Q?ca_do_I=2ES=2ET=2E?= Message-ID: In-Reply-To: User-Agent: Opera Mail/11.60 (Win32) Subject: Re: [PHP-DEV] Reflection to remove final From: glopes@nebm.ist.utl.pt ("Gustavo Lopes") On Wed, 18 Jan 2012 00:00:09 +0100, Jan Dolecek wrote: > This issue seems much more complicated than I thought. We'll need to > consider all cases which could cause troubles and have a solution for > them. > > Namely: > - rewriting permanent structures for internal classes, which are > being kept between requests, must be avoided > - races in threading models > - rewriting in bytecode caches must be avoided > - anything else in mind? > > I'll try to think about it, but I'm not that experienced with php > internals, so any suggestions welcome. > I think you should approach it in a different way. Don't remove the final modifier, just ignore it in some circumstances (e.g. interface, annotation). PHP doesn't support annotations (at the engine level) and interface processing is currently done after checking the final class flag; additionally, there may be some code that relies final classes not having subclasses to this is probably still not going to be trivial. -- Gustavo Lopes