Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119567 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 7594 invoked from network); 17 Feb 2023 08:14:08 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 Feb 2023 08:14:08 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5311C180210 for ; Fri, 17 Feb 2023 00:14:06 -0800 (PST) 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.8 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, 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-oi1-f176.google.com (mail-oi1-f176.google.com [209.85.167.176]) (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 ; Fri, 17 Feb 2023 00:14:05 -0800 (PST) Received: by mail-oi1-f176.google.com with SMTP id j3so2840063oig.10 for ; Fri, 17 Feb 2023 00:14:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ew5cBZEHoalJ6UA4wX5YfMFPHRJyVq8SOg6bQwOwafE=; b=FhwC6mLA0UyxduLjsLcTCrDBwrQESU/8fOPkNTlh3QCKy4HvWhZx7/svYKArDubKj+ LJsxz8VNsRGIe9jPiZc/GuTmgVQy3KBYnNHvzToPW0eKNwIqxWWe6gKHEhwBvgFGfeuk ow3QrT0UHAwP7RadbWBv4HjOJfOhxTlhQdWEnWz+neiAmMcASVTCnVyTpFJlMqGB34iJ qEL7A4L+kwm/sCVAvcdOajZfz23U2RMVBFusNByMYmuWH7hfRMZUzKpPxqoQfv/vJjcN JB9Mop73nhFpJwc43yUffcoebUd6KIxy6mms22eyP0brQorYfGHA/pwOdliL6Y2krtpf zeww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ew5cBZEHoalJ6UA4wX5YfMFPHRJyVq8SOg6bQwOwafE=; b=jVHP3I+hW3xT1TmbBxMO7IZzRnKq5AC1jazsuYNrqxce5q/6NBES2j7eHCTTxLND2x a8wtkm3sA3OTWgJECRFbPS7sDyIQSqQsbJ+SpV34Fp1QpEIZPjbsTC1uwvPh2sFeNhAR +2dDqNAKwGS8Z0YRWUKC1hYfeSJVhZRz8B1QGRu80rDNjOP6D053CmNih/l8jhMuhdpV plWo6wHDuSXlkEaDEmxoJvVLQL7yBWnzwBA/q3VCraejqVxjHtoCUFLTPZc7BQpKOfLX kqSR/a+iBPr5Or5RMBNbAI9IIdMid8EegDqSau78pwXoiadTxIssFFp3wKprHgpSmYVb 680Q== X-Gm-Message-State: AO0yUKVDceIwW/eumufikpBb4hUx0X/th76GWnh5aogD/zhR5JAmCaCm 33r+lFUBcoz0Z9QdC1w2UFU42vN1sescqJSWXVw= X-Google-Smtp-Source: AK7set+An+St5v+sqM0iXTZheEvmhfebxT+Uh+B2ml5HUZdi+dhVD3RWczUcIPbALYm5B/z9AYcPydzDuPIARPERBCE= X-Received: by 2002:a05:6808:2125:b0:37a:c14e:afc2 with SMTP id r37-20020a056808212500b0037ac14eafc2mr469387oiw.61.1676621645043; Fri, 17 Feb 2023 00:14:05 -0800 (PST) MIME-Version: 1.0 References: <7617203E-1976-4999-97E4-2D018CF300E6@gmail.com> In-Reply-To: <7617203E-1976-4999-97E4-2D018CF300E6@gmail.com> Date: Fri, 17 Feb 2023 09:13:53 +0100 Message-ID: To: Claude Pache Cc: PHP Internals List Content-Type: multipart/alternative; boundary="000000000000935fc505f4e0e5fd" Subject: Re: [PHP-DEV] [RFC] [Discussion] Typed class constants From: kocsismate90@gmail.com (=?UTF-8?B?TcOhdMOpIEtvY3Npcw==?=) --000000000000935fc505f4e0e5fd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Claude, The RFC states that it is technically not possible to have a constant of > effective type `static` or `self`. While this is probably correct for > regular classes, this is not true for enums. The following code ostensibl= y > works (https://3v4l.org/84W92): > To be exact, defining class constants with the class itself as value is already impossible: https://3v4l.org/J7C30 So this isn't really a limitation imposed by the current RFC, but a new yet mentioned restriction of https://wiki.php.net/rfc/new_in_initializers. I'll try to make this clear in the RFC text. Since the discussion has been settled for quite a long time, I'd like to start the vote in the second half of next week, unless new concerns are brought up. So it's time to review the RFC carefully :) M=C3=A1t=C3=A9 --000000000000935fc505f4e0e5fd--