Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120261 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 71247 invoked from network); 13 May 2023 15:18:16 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 May 2023 15:18:16 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A632F180548 for ; Sat, 13 May 2023 08:18:15 -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,FREEMAIL_FROM,NICE_REPLY_A, 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-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) (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 ; Sat, 13 May 2023 08:18:15 -0700 (PDT) Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-50bd2d7ba74so98084785a12.1 for ; Sat, 13 May 2023 08:18:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683991094; x=1686583094; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=jPcAxBXfn0hGKueGhGLCezc7oIGg8+17rIyDEQs4S4w=; b=FU/5RJ6a5pZCTV1pdyeqTThUige8yDA7neK9Cc8UFFKglOYYkmVjNe0GIHeuRTrP3N JZI/cFUJI+Z1ySXSFxD+JhZjzYxrc1DY/83rWbSdEbrhBH339EdY3V+IyVgoLijKXTrY QiZIUR5QLtcFcxO21CVbJ4L1dxqHMdrV5Ps44P0ZzZ+oUaHRLXrCWDMpOyRNgddXD7fd ZOkCUYty9fTmeAULlQWaGCQzi1k0Yg9/csRJp2oTCaBATXBxAJfYAYypVSwf8Ssox1rp pdYT4FKce0yjzPTW1I5GRBpsEdK19nC7LxGnJgoY264EL0xRe586A4Yl1wPz2Lhf1Rpl 0u9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683991094; x=1686583094; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jPcAxBXfn0hGKueGhGLCezc7oIGg8+17rIyDEQs4S4w=; b=D+BzokZpzXK71wc+s0quOy5AlUV3zZgPdVk37aXUB3fu1Dqrzke+q381a2QYtrZqZS sqcRrRJjQI8iHO9KJ10wrd4Pf6JbOxTXwl4jeT6gOQqvbQyDr65zTsf4E+ILtfcTuU4x KykC7jL43AkGLOz+BMg1Qu9cEQXiORJPJuFju0MWGTDY8r09EWSjEE4z/FQ7yNyUZqAP x1yF0raK0zB08gfmNl8JibeiB5BuPsJba46nhxnauQy723LhmYV9CbCDGMsLFbroNNRo iSOCJ3HKAS49AsueDVC2mx5l7vMkEx10L9KYir63b8/qwSzBCxnvGs5EBUxtD8Q2dArG x7GQ== X-Gm-Message-State: AC+VfDy4UQ6bgxl5HpoGDCcO8Vzk85CWYDcBvH6RO/gFSMt9jsa5t/Wl /yEpp+sMg3MRVM4f3xDDtzo= X-Google-Smtp-Source: ACHHUZ5v8xan3s0KNh3tfHe6TK75BtMs+kLTs1edOuX1MQxAlTsv49JjDnGNaSmGgNFsoVIEgHggZA== X-Received: by 2002:a17:907:1c23:b0:966:2984:3d9a with SMTP id nc35-20020a1709071c2300b0096629843d9amr21084567ejc.20.1683991093596; Sat, 13 May 2023 08:18:13 -0700 (PDT) Received: from ?IPV6:2a02:1811:cc83:eef0:7bf1:a0f8:a9aa:ac98? (ptr-dtfv0pmq82wc9dcpm6w.18120a2.ip6.access.telenet.be. [2a02:1811:cc83:eef0:7bf1:a0f8:a9aa:ac98]) by smtp.gmail.com with ESMTPSA id h25-20020a1709070b1900b0094ef923a6ccsm6880769ejl.219.2023.05.13.08.18.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 13 May 2023 08:18:13 -0700 (PDT) Message-ID: <18792247-e016-2d49-253a-1a10efbde023@gmail.com> Date: Sat, 13 May 2023 17:18:12 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 To: Robert Landers , internals References: Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] [Discussion] nameof From: dossche.niels@gmail.com (Niels Dossche) On 13/05/2023 09:27, Robert Landers wrote: > Hello Internals, > > It is with much trepidation and excitement that I'd like to announce > the `nameof` RFC (https://wiki.php.net/rfc/nameof). It has changed > quite a bit in the last couple of days, so if you haven't seen the > latest draft, please check it out. > > Essentially, it allows using `nameof()` anywhere a string can be used, > even in static contexts. From a developer's perspective, it is a > string and from the engine's perspective, it is also mostly a string > (depending on how deep we want to go on error checking -- see the > RFC). > > If anything is unclear or if I missed something, please let me know. > > Robert Landers > Software Engineer > Utrecht NL > Hello Robert Thank you for doing the proposal. I can see some places where I might use this. I have an additional question that I don't think has been asked yet. About the interaction of nameof with "variable variables": What should be returned by `nameof($$variable)`, and similarly `nameof($$$variable)`, etc? Defining the semantics for this, and giving examples in the RFC text would be great :) Good luck with your RFC. Cheers Niels