Re: Is there an RFC/discussion for ::class being a specific type?

From: Date: Tue, 16 Nov 2021 23:10:42 +0000
Subject: Re: Is there an RFC/discussion for ::class being a specific type?
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-116430@lists.php.net to get a copy of this message
On Nov 16, 2021, at 14:02, Kamil Tekiela <tekiela246@gmail.com> 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().

« previous php.internals (#116430) next »