Req #77559 [Nab]: Support callable::class and array::class

From: Date: Sun, 03 Feb 2019 04:04:56 +0000
Subject: Req #77559 [Nab]: Support callable::class and array::class
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219340@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77559&edit=1 ID: 77559 Updated by: requinix@php.net Reported by: mister dot pedantic at example dot org Summary: Support callable::class and array::class Status: Not a bug Type: Feature/Change Request Package: *General Issues Operating System: Irrelevant PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Actually this should get a longer answer. array and callable are keywords. They cannot be used for classes. http://php.net/manual/en/reserved.keywords.php int and string and such are not keywords, so int::class and string::class are supported. However at this time you cannot create classes named "int" or "string" because PHP is reserving those for its own possible future implementation. Previous Comments: ------------------------------------------------------------------------ [2019-02-03 03:58:29] requinix@php.net Neither of those are classes. ------------------------------------------------------------------------ [2019-02-03 03:53:51] mister dot pedantic at example dot org Description: ------------ AFAIK, all ::class work except these two. Thanks. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=77559&edit=1

« previous php.bugs (#219340) next »