Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116425 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 40682 invoked from network); 16 Nov 2021 20:23:51 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 16 Nov 2021 20:23:51 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 986B11804DB for ; Tue, 16 Nov 2021 13:18:53 -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 13:18:53 -0800 (PST) Received: by malamute.woofle.net (Postfix) with ESMTPSA id 09D5A1EF59; Tue, 16 Nov 2021 13:18:52 -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 13:18:51 -0800 Cc: PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <968C461B-8CFE-44B3-BED1-5508B1D68B3B@woofle.net> References: <05aa01d7db0e$783fa120$68bee360$@webkr.de> <05b601d7db18$18d59eb0$4a80dc10$@webkr.de> 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 10:56, Kamil Tekiela wrote: > Ok, but a popular usage is also with functions. For example, = strlen::class. > What should the compiler use in this case? Popular in what context? I'm not sure this usage is even correct. strlen::class isn't the name of = the strlen function; it's the name of the class that you'd be = instantiating with "new strlen()", which would be relative to the = current namespace. If your code is running in the root namespace, this = will happen to resolve to "strlen", but that doesn't mean it's returning = a callable.=