Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119463 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 48438 invoked from network); 3 Feb 2023 20:08:14 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Feb 2023 20:08:14 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 62B161804F7 for ; Fri, 3 Feb 2023 12:08:13 -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.7 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (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, 3 Feb 2023 12:08:12 -0800 (PST) Received: by mail-ed1-f52.google.com with SMTP id n6so6263669edo.9 for ; Fri, 03 Feb 2023 12:08:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=+MhsZz1g9KK+QfDqGtFZOndzyCUxcGnIS3No49JW54o=; b=BkSjgLY1ywTIk4cchloKMHy3iMGRZXMbO5uSzwzyGw+ijmJUa3CfE9J1RLj1kMTEjr kl22bdPLIlwGHWKHqHwj4aRn12gDA9vZhghg+735Uvy4hx6pnJ8g/EiZUztc0H8ijOtT qLFY1K70u4ZjXvd4wGCiYq9PXQoCmSWsFhfd6QR2G6egkEs1C/M9zYw8OfOFH4Nf0/b/ kRzvo/MZSzBiVkMVzYhCIOnH6tl3LTvLMkId7NiqNymja5E9d+UMl37jrYZgouS6rkUq sozAPQd0VVco64MNxP9tPsZzUWgTeGndu60ZkNvXM8uPZN+j5TQMGgVdZ5ARh4bkVIZo JuRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=+MhsZz1g9KK+QfDqGtFZOndzyCUxcGnIS3No49JW54o=; b=E5cyyq73SZEA6BctcuQ1RMYwYukL6vRM89lbfhHs8JInS8HkfuVseNmdNMJoRBp9Tj Cp9IyJ70t/7/YfzOpIEAdjoYJHl5k05aQDns/Mr1ICFF/eyeRBPfjrtRBoaDQ+latrpU RKTHGvxToBROHtDiYTcxIy5cJriAaRwftAhsUxGYGMr0MwqipmNA9iqJJ4/jq1ZIq1Mp i1oePmMTtrVrbT2UxTzgzxXh/EwW/nUxYM/NsWhaGvhGEnaeAx+gE7mf8F7bOnz1B/Zx 3/fMq233watX0ec2VeKN/Kf2IEqxV7rKa9/1tlOnwlrbYfuQ5biLIVwCRy4W5Ye6L/Af qf5w== X-Gm-Message-State: AO0yUKWEUScL4HUwM2pqBLXVZpG3cA/8D89BkWF/KNLXKEL8H6+gVr8u c5hF+QlU6O7+s00uvfxipzUdVIuRgbE= X-Google-Smtp-Source: AK7set9nngPQHYJ6CR5aZK7llDhVEABsoDvZFx7OutW2kONqYJJr2bdJh+rCrFlmh4EuNNEEVkbNaw== X-Received: by 2002:a05:6402:b21:b0:499:8849:5fb6 with SMTP id bo1-20020a0564020b2100b0049988495fb6mr11044645edb.30.1675454891549; Fri, 03 Feb 2023 12:08:11 -0800 (PST) Received: from smtpclient.apple ([89.249.45.14]) by smtp.gmail.com with ESMTPSA id cw20-20020a170906c79400b008787c8427c1sm1790164ejb.214.2023.02.03.12.08.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Feb 2023 12:08:11 -0800 (PST) Message-ID: <7617203E-1976-4999-97E4-2D018CF300E6@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_8B1CE5C3-D321-40A5-9D28-4E750B9901CF" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Date: Fri, 3 Feb 2023 21:08:00 +0100 In-Reply-To: Cc: PHP Internals List To: =?utf-8?B?TcOhdMOpIEtvY3Npcw==?= References: X-Mailer: Apple Mail (2.3731.400.51.1.1) Subject: Re: [PHP-DEV] [RFC] [Discussion] Typed class constants From: claude.pache@gmail.com (Claude Pache) --Apple-Mail=_8B1CE5C3-D321-40A5-9D28-4E750B9901CF Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Le 31 janv. 2023 =C3=A0 22:01, M=C3=A1t=C3=A9 Kocsis = a =C3=A9crit : >=20 >=20 > Please find the updated RFC here: > https://wiki.php.net/rfc/typed_class_constants. >=20 > Regards, > M=C3=A1t=C3=A9 Hi, 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 = ostensibly works (https://3v4l.org/84W92): ```php enum qux { const foo_alias =3D self::foo; case foo; } var_dump(qux::foo_alias); // enum(qux::foo) ``` I think that `self` should be allowed here, because it is meaningful. =E2=80=94Claude= --Apple-Mail=_8B1CE5C3-D321-40A5-9D28-4E750B9901CF--