Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116430 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 55950 invoked from network); 16 Nov 2021 22:15:41 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 16 Nov 2021 22:15:41 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A5F7B1804C6 for ; Tue, 16 Nov 2021 15:10:44 -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=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS63949 74.207.252.0/24 X-Spam-Virus: No X-Envelope-From: Received: from malamute.woofle.net (woofle.net [74.207.252.100]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 16 Nov 2021 15:10:44 -0800 (PST) Received: by malamute.woofle.net (Postfix) with ESMTPSA id 46B5E1EF59; Tue, 16 Nov 2021 15:10:43 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\)) In-Reply-To: Date: Tue, 16 Nov 2021 15:10:42 -0800 Cc: PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <4D3F5A9E-9009-4DC5-BC74-47DA0501E6DE@woofle.net> References: <05aa01d7db0e$783fa120$68bee360$@webkr.de> <05b601d7db18$18d59eb0$4a80dc10$@webkr.de> <968C461B-8CFE-44B3-BED1-5508B1D68B3B@woofle.net> To: Kamil Tekiela X-Mailer: Apple Mail (2.3693.20.0.1.32) Subject: Re: [PHP-DEV] Is there an RFC/discussion for ::class being a specific type? From: dusk@woofle.net (Dusk) On Nov 16, 2021, at 14:02, Kamil Tekiela wrote: > When used with a name of a function, it will give you the name of that = function as a string. Again, this is not true. Names of classes and functions are not resolved = the same way. Consider: namespace Some\Namespace; use function Other\func; print func::class; This prints "Some\Namespace\func", but calling func() in the same = context will refer either to Other\func() or \func(), depending on which = is defined -- never to Some\Namespace\func().=