Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120120 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 41411 invoked from network); 24 Apr 2023 22:12:06 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 24 Apr 2023 22:12:06 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4FDFC180539 for ; Mon, 24 Apr 2023 15:12:04 -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=-0.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,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: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (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 ; Mon, 24 Apr 2023 15:12:03 -0700 (PDT) Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-956ff2399c9so853479766b.3 for ; Mon, 24 Apr 2023 15:12:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682374322; x=1684966322; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=6ZnKkWjlit2l5he/kPMdDjpSfUFnnaj56rP2Eyv+dfc=; b=KkbZ0uhqq+FM99o2Z0bghlvhvJIFFsw9Fqc9WjYYkR9q1U6QAGTWBBa9S0YfIrYyG5 uXa+lFK9ZhDhx64Guo/7EKNHlSkUxvcIGGzukmLu8OFl62qn3Zx53KyUEyanDfq2jLiT gqv+N51TtuhKFizp7pJvk29bSS/tpHiKzrOUyV++3fVZ96nskBv8bhhhuFLW+XI5zapX EXl3bIV2l1v0UtB6G0T+wuBhq2p+6bZ7XadDlaNpvE4Oew2y98qCPqEHU146U8/OvoPJ 13n9sQXAh3I7Pvs6UqNcoMu0SdlrQK2XNGbyE2RbNFw0IKoUHWuERc2iswThsKNWhPw7 X9AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682374322; x=1684966322; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6ZnKkWjlit2l5he/kPMdDjpSfUFnnaj56rP2Eyv+dfc=; b=A4YU9i4xfNr95Om7siRehoXI3WF5emFZA3jrmsI80qFSh4NwSdu2hUiyfuIZ4Ywzqk mAfcxZUZkbntk4CjL/Q650plmG2D2S+gY7LsmpGDedA+oweGhUI3/KVO4By3zzt6EAy2 3YGFBZtwF13M1JXKEdlNZEQX37zwBAG+7xWlzQZ30zHm9h5a/f2H/iVqdDOoJ+CCtUaR 1sPSDC5xQMOHg9e+Szxfi98OSlUUV1WPS6RI4OmvF+TcLsSRDSijBKjvZ05n5dXCPCsr 9ZYIU34e6TrNH83ker9QMezJDitFngGM+77Q+RYiOcnOTX8puCuWy7lWnPVpjTKbf7HB RjzA== X-Gm-Message-State: AAQBX9ee8MGNMP8nNVJ8xLIZOxGfwh/SgJa/wHuG+hxefwXwpyznEpDo bnLUUt/TrYmso8UPzYtw+6gPkaMmpqg= X-Google-Smtp-Source: AKy350YKdgU4RUvNCNTvzugbgqCr1VxffYyfjhvVH9fuiOCuOzTrqphGSI4A34oNJnZkG01BSnNBkg== X-Received: by 2002:a17:906:6dd6:b0:957:12a6:ac9 with SMTP id j22-20020a1709066dd600b0095712a60ac9mr10613852ejt.36.1682374322410; Mon, 24 Apr 2023 15:12:02 -0700 (PDT) Received: from smtpclient.apple ([89.249.45.14]) by smtp.gmail.com with ESMTPSA id g13-20020a170906348d00b0095337c5da35sm6073323ejb.15.2023.04.24.15.12.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Apr 2023 15:12:01 -0700 (PDT) Message-ID: <2F21E8B8-190F-4E46-B42C-5EB490EE2AF7@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_697AE9F8-D988-4DEC-A8E1-DC1318775871" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) Date: Tue, 25 Apr 2023 00:11:50 +0200 In-Reply-To: <67b1e9b0-b7c6-71d4-cad2-2286edab759b@daniil.it> Cc: internals@lists.php.net To: Daniil Gentili References: <67b1e9b0-b7c6-71d4-cad2-2286edab759b@daniil.it> X-Mailer: Apple Mail (2.3731.500.231) Subject: Re: [PHP-DEV] Final anonymous classes From: claude.pache@gmail.com (Claude Pache) --Apple-Mail=_697AE9F8-D988-4DEC-A8E1-DC1318775871 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Le 24 avr. 2023 =C3=A0 12:28, Daniil Gentili a = =C3=A9crit : >=20 > Hi all, >=20 > I've submitted https://github.com/php/php-src/pull/11126 to add = support for final anonymous classes, though as noted by iluuu1994, it = would probably make more sense to just make all anonymous classes final = by default, what do you think? >=20 > Daniil Gentili. >=20 Hi, Extending an anonymous class is indeed possible = (https://3v4l.org/pDFTL), but it is a hack as best. If someone wants a = non-final class, could they not write a non-anonymous one? As a bonus, = they wouldn=E2=80=99t need to instantiate the class before referencing = it. =E2=80=94Claude --Apple-Mail=_697AE9F8-D988-4DEC-A8E1-DC1318775871--