This code throws NoClosureOnLine exception
$closure = (new Something())->foo(...);
ReflectionFunction::createFromClosure($closure);
it seems ReflectionFunction::createFromClosure does not support first class callables. Is there any other way to get reflection of given closure created by first-class callable?