Hey Michael, <http://ocramius.github.com/>
On Sun, Nov 8, 2020 at 9:38 AM Michael Voříšek - ČVUT FEL < voris...@fel.cvut.cz> wrote: > Hi, > > what about resolving directly to Closure? > > strtoupper::function === \Closure::fromCallable('strtoupper'). > > $this->method::function === \Closure::fromCallable([$this, 'method']). > > With kind regards / Mit freundlichen Grüßen / S přátelským pozdravem, > >From a tooling point of view, it would be super-interesting to get a FQN of the function, instead of a closure (which is just `\Closure`). In this snippet, I'd expect the output to be `foo\bar\baz\taz`: ```php <?php use function foo\bar\baz; echo baz\taz::function; ``` Not sure if `string` is enough, but it worked really well for `::class`, for which tools like psalm now have a dedicated `class-string` type :-) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/