Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121356 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 34891 invoked from network); 17 Oct 2023 17:06:47 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 Oct 2023 17:06:47 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CE6851804B4 for ; Tue, 17 Oct 2023 10:06:46 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS2639 136.143.184.0/24 X-Spam-Virus: No X-Envelope-From: Received: from sender3-of-o59.zoho.com (sender3-of-o59.zoho.com [136.143.184.59]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 17 Oct 2023 10:06:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697562400; cv=none; d=zohomail.com; s=zohoarc; b=BJf09Nvt4Ejb7BI/TyWs64zxjtAN+GgLTo6IYILhix8lvDSHwDCHapT5r0PZe7B3UqPTV/jgZsMFRa01arOThraGi2oUgbtU6RV10wL46f1ZLS56oT4HBr+Zc3juXOi30lmqIdA5n1zY9QqQ1a39ADPJ2dYTz6fbSlAM9U2TPYg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697562400; h=Content-Type:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=9P2smmrf3eDGdzs7LJggqksHnN3GZ5ZAZOF34iH8lXA=; b=EQBwSaH+OaPCUz1zzI07MvVGlNMQ39HYzY3l1qh4pjFh9CVlCywLOVYdww7BEPWZA77y5ZwLrXoebQNTl6NgRyoT5F38m+zca918qwOyqqsPYcIo/dxjJ4aOFEmq99wIwYZahnE7GmyQR56bh2hKaU0RCqgILwCZXbqTrG1jCtQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=daniil.it; spf=pass smtp.mailfrom=daniil@daniil.it; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1697562400; s=daniil; d=daniil.it; i=daniil@daniil.it; h=Content-Type:Message-ID:Date:Date:MIME-Version:To:To:From:From:Subject:Subject:Message-Id:Reply-To:Cc; bh=9P2smmrf3eDGdzs7LJggqksHnN3GZ5ZAZOF34iH8lXA=; b=V+oTLWfjO6iN1HbZW4jl7FwG98LS+OXXzbqaB8T5Fa9/kasrXyCmqFNZLPa0aWiY GSTvcSf1xzTVh9WwsEGwUhoNKh7mz4rehKckbGOls51nIefo7RAgRKU7tpafUZ2b9ZC qFsZkz93LTtvmvW8PV/5NVM8Gz+o3oAQFLq16jmE= Received: from [192.168.69.233] (128.116.205.77 [128.116.205.77]) by mx.zohomail.com with SMTPS id 1697562399260196.92563540313233; Tue, 17 Oct 2023 10:06:39 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------QZ3PsMaWa74Zu09vsXmHFpZv" Message-ID: Date: Tue, 17 Oct 2023 19:06:37 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: internals@lists.php.net X-ZohoMailClient: External Subject: Final anonymous classes From: daniil@daniil.it (Daniil Gentili) --------------QZ3PsMaWa74Zu09vsXmHFpZv Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi everyone, I'd like to submit an RFC to add support for final anonymous classes. This should also allow some additional opcache optimizations. I've already prepared the implementation at https://github.com/php/php-src/pull/11126, what do you think? Personally, I would have instead preferred the much cleaner approach of making *all* anonymous classes final by default, (preferrably) without offering the option to make them non-final. However, I understand that this might be a little bit too restrictive for something that may have some valid usecases, even if extending anonymous classes currently requires some hack-ish workarounds with class_alias. All in all, as per the title, I'd just like to add support for final anonymous classes (new final class {}), without changing any existing semantics. What do you think? Thanks, Daniil Gentili. --------------QZ3PsMaWa74Zu09vsXmHFpZv--