Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116419 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 20272 invoked from network); 16 Nov 2021 16:27:08 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 16 Nov 2021 16:27:08 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1FE1618053E for ; Tue, 16 Nov 2021 09:22:07 -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=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS24940 78.46.0.0/15 X-Spam-Virus: No X-Envelope-From: Received: from mail.webkr.de (mail.webkr.de [78.47.173.34]) (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 09:22:06 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 11F971A0CC5 for ; Tue, 16 Nov 2021 18:22:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=webkr.de; s=dkim; t=1637083324; h=from:subject:date:message-id:to:mime-version:content-type: content-transfer-encoding; bh=sBnl+IppoOm1c5wVPB3RBwTY/S/p0asNllQ7vBAD1UA=; b=Hm2YXbpOdKBkg4AQDKura/JsTG1v1YcQ1KZ3eVuc05JRuGbzeLWmSW8/GbSCGRqpOkuUlo JcW/5By9w+xHg4vhr1QxQGPm8RMZY9OaAH6mKPRTAmggTsb6SqSbpcGm3nwc7ChBy9wytx 9u2FmJC8sfuisTsJMLLRghdW3mBu/L8= To: Date: Tue, 16 Nov 2021 18:22:01 +0100 Message-ID: <05aa01d7db0e$783fa120$68bee360$@webkr.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Thread-Index: AdfbDnZw3COvg09VTZmUHw/EKWG0dA== Content-Language: de X-Last-TLS-Session-Version: TLSv1 Subject: Is there an RFC/discussion for ::class being a specific type? From: andre@webkr.de (=?iso-8859-1?Q?Andr=E9_H=E4nsel?=) It is common (with DI systems for example) and to my knowledge not particularly discouraged to have function parameters that are supposed to accept something like Foo::class, which currently is a string. It seems logical to ask for a special type that can hold class names, so that parameters that can accept a class name can be type hinted more specifically than just (any) "string". Regardless of whether or not such a proposal would be accepted or declined (for complexity reasons maybe) I couldn't even find any such proposal. Has this really never been asked?