Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120292 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 91567 invoked from network); 15 May 2023 18:18:35 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 15 May 2023 18:18:35 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 17C98180382 for ; Mon, 15 May 2023 11:18:34 -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.7 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, 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-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (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, 15 May 2023 11:18:33 -0700 (PDT) Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-3f427118644so86882265e9.0 for ; Mon, 15 May 2023 11:18:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684174712; x=1686766712; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:user-agent:subject:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=/VRWuxt+94Qww2UdUZhysaOyhhegI8x3znq7CRPwTSI=; b=Q0xah5Zw9Hk40FenKMGNF+GTlcTDoW72f+IL+YKtFkeS5nm8EGN3VxaEunVLhXP9E0 mXK1zPMNoTno1VjyAbueMpLhLuWSOpommiNDdw6Riep9UQPZO1YbV/85nRM2oaRFj8BX QrE2I8pwm/tqJiQd7bacdJASNLjHVIJavtxnoRxg/fTYmirs80uGxJqSiPzoWIzT4TTf pIdDrnYRKSk7q+HDNTUdyQJmW1tXXGirwxduiQp2WA9kIPOVtFhBp2a+cq+7xLWaHnfm /Is98TwsSw2iNnghOYWWa7fGCHXu5McVGEiM/M4nui8sljBrFYX3qNK8fD1RsseRfveb SMfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684174712; x=1686766712; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:user-agent:subject:to:from:date:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=/VRWuxt+94Qww2UdUZhysaOyhhegI8x3znq7CRPwTSI=; b=bI9aosCbH5GhcD+Lotudr0Zf19VSFs1tjKpi4J+vtla/+iJWXt6Mfqw6+kDlidXvR0 lq9mx+W9Bon+b9Z6sFE3zEmVMI+zvzfdMEFbmrjVO8czMlxRXYvqfjfXmonU+7IgJPPn rCqbxxskmyycxwTu5isuHuUvfm+rtSI4TN4F098Txnu9X7hvlzm6ZR7Vj1hegLOk19zA 2ygUIgpjkMp+xy+dQP2A+v9Oju4x8U8yQmaXm5MyEyP1qZNR0nBGXdTdEBUdkwKEiZUz cJZ6IvDKJa4yy935QsQpB1q+QP4sr+nZ3SAB7iSDqskJIBB6fNGTPGHzG7pVmNY3ao2Y D7oQ== X-Gm-Message-State: AC+VfDzJUKHzIZzIGfecdUobSa8uAS30doflmyYpXguoxyAFRscBTMXh GkB1fOJPmkanETy8+qvB4cfM2heBUAE= X-Google-Smtp-Source: ACHHUZ6SVqocp22isQzfaI1tYGo/Trk+hlX+EQY4uwORzP6CAnzFoMRQ1oWjnc8EJAe1BEH6d22oIA== X-Received: by 2002:adf:f64b:0:b0:307:873d:2ea with SMTP id x11-20020adff64b000000b00307873d02eamr25954719wrp.47.1684174712077; Mon, 15 May 2023 11:18:32 -0700 (PDT) Received: from [127.0.0.1] (cpc83311-brig21-2-0-cust191.3-3.cable.virginm.net. [86.20.40.192]) by smtp.gmail.com with ESMTPSA id r10-20020a5d52ca000000b003079c402762sm525171wrv.19.2023.05.15.11.18.31 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 May 2023 11:18:31 -0700 (PDT) Date: Mon, 15 May 2023 19:18:30 +0100 To: internals@lists.php.net User-Agent: K-9 Mail for Android In-Reply-To: References: <436378BB-FDFA-43BD-A633-C030C347E683@gmail.com> <359D9C64-52A5-4BF5-91B5-72F7CE116F78@gmail.com> Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] [Discussion] nameof From: rowan.collins@gmail.com (Rowan Tommins) On 15 May 2023 18:44:47 BST, Robert Landers = wrote: >use const \NoExist\TEST; >use \NoExist\Channel; >echo TEST; >echo Channel::class; > >the output is: > >Undefined constant "TEST" in =2E=2E=2E >Channel I'm not sure how you got that; according to https://3v4l=2Eorg/gltKN only = PHP 5=2E6 has a message with the unqualified name: > Notice: Use of undefined constant TEST - assumed 'TEST' in /in/gltKN on = line 5 Before that, there was no "use const", and in every version after that, it= 's a fatal error with the fully qualified name: > Fatal error: Uncaught Error: Undefined constant "NoExist\TEST" in /in/gl= tKN:5 Take the constant part away so that the next line runs, and https://3v4l= =2Eorg/q0XQO shows the fully qualified name right back up PHP 5=2E5, becaus= e expanding the name is actually the *only* thing that ::class does in that= context=2E Regards, --=20 Rowan Tommins [IMSoP]