Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118977 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 59751 invoked from network); 6 Nov 2022 20:07:09 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 6 Nov 2022 20:07:09 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 820AF180211 for ; Sun, 6 Nov 2022 12:07:08 -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=-2.1 required=5.0 tests=BAYES_00,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-vs1-f48.google.com (mail-vs1-f48.google.com [209.85.217.48]) (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 ; Sun, 6 Nov 2022 12:07:05 -0800 (PST) Received: by mail-vs1-f48.google.com with SMTP id z189so8858724vsb.4 for ; Sun, 06 Nov 2022 12:07: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=7HTOOjBoMD2u+rAnoBVCIC9PThrZfziGcJu0PGIu/f0=; b=NggabGOZd2B35Qb2KwK7OUyGMhDRzdMfppgGFmmDw1NRzwg+R+oqTTxJmMFmPQ10+D xeN4iddmw/3L9QAIzTLcxuBqSkO9hx6ssSUyM4jXYXWUZx1PdUomvTxU8CigHPIqk49f 1aOMYorywzdT5KLT7aBTNIvbwI44ZkUnEslKSWpmK7b4vZRx1U5mLGsn3e8yI5SjtcmZ kr/iM+mrsQBW/h94yzZGQORstpHlroAfn9vtvwB9kCMslO/twq3JVsZiklBPpmKVzVRJ amo2olAPNqlsOMxgTecuM4k8zk5io6jUmqz+/5vKRemYRguhXyqy58Oohi6F1LTV8kYX a3Wg== 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=7HTOOjBoMD2u+rAnoBVCIC9PThrZfziGcJu0PGIu/f0=; b=1sKzLOUmtWadTywGDSIhL1+6VBuF5fMeuEMKhVLQeZV8SDpho7ynx1EY1yzTZ6mQwF kaE8fLdBzx9XZgBT7JUhcgjVKfjbHAZ6loY2OrcJAaE8P+Q+0WmGVtNf2N+09l4TQlxz hjZ3Loco1b6hSKXN8kph4MZj4yFdkEmXUJuk5oCNwMjpoIuSStRRAjsYE4yOnkXFMGn5 H7+ZCbY/JK0fK/zMDAcv6mJPa3gAOY+oGpjtSZ0V9uUrI/tX6Bb2/o6FWMkoJ2qW8u46 05tGL/4p8oF+CtIVvGJbHTjv6PbPZEtE6VRxjuF5PB3h6oqq/OdTEFz1qa0exmB7OfcL rfoQ== X-Gm-Message-State: ACrzQf0pUVlLtaF0E6yuZCsK/CxN0U6QkqgzocHdcGo+CT8eEzowcaPt JcEyaeguJKMoMX3R7ZqDyrRph7zhY/4Usi00yPQ1QcjD+mU= X-Google-Smtp-Source: AMsMyM5FHZMVb4m52+q5ByrpTsAhA2yWGTCXFA0wQ31NqwEKe8TEuo0asdjp0ze8Qvi3wY2hk6GXD8OKjC0kT0huP9U= X-Received: by 2002:a67:c001:0:b0:39c:85e5:bccc with SMTP id v1-20020a67c001000000b0039c85e5bcccmr24673031vsi.35.1667765224317; Sun, 06 Nov 2022 12:07:04 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Sun, 6 Nov 2022 21:06:48 +0100 Message-ID: To: Ilija Tovilo Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000c3a8cd05ecd2d9de" Subject: Re: [PHP-DEV] [RFC][Dynamic class constant fetch] From: nikita.ppv@gmail.com (Nikita Popov) --000000000000c3a8cd05ecd2d9de Content-Type: text/plain; charset="UTF-8" On Fri, Nov 4, 2022 at 3:26 PM Ilija Tovilo wrote: > Hi everyone > > I'd like to propose a simple RFC to introduce looking up class > constants by name. We have dedicated syntax for basically all other > language constructs. This RFC aims to get rid of this seemingly > arbitrary limitation. > > https://wiki.php.net/rfc/dynamic_class_constant_fetch > > Please let me know if you have any thoughts. > The proposal looks reasonable to me. While I wouldn't expect this syntax to see much use, it does remove a syntactical inconsistency in the language. > Order of execution See https://www.npopov.com/2017/04/14/PHP-7-Virtual-machine.html#writes-and-memory-safety for why the order of execution is the way it is. As class constants do not support writes, these concerns do not apply, and the "normal" order can be used (as you propose). Regards, Nikita --000000000000c3a8cd05ecd2d9de--