i think we should check is_callable. according to the php doc, \Closure is an implementation detail. and anyway we also can to allow passing other callable things, it does not need to be an anonymous function