You should not document the anonymous function, instead you should document a variable. It will look like:
/** @var \Closure $length */
$length = function() {
return 20;
};
as tag @var is applicable for regular variables as well. That, however, normally isn't needed: as PHPDoc is intended to be used by IDE and most of IDE-s will be able to get that your variable is a closure right because you have your assignment.
If you will want to pass that variable somewhere - the you may hint in in the accepting method/function as a callable or \Closure explicitly, even without PHPDoc (but you also can use PHPDoc as well)
For details about @var tag, see the documentation. Also note, that the closure type or callback will have nothing to do with the value type which is returned by that callback - it is obvious that you're declaring your callback, not calling it (that being said: I assume "length" isn't a good name for a callback as it cause confusion. Use some action-related name instead, like "lengthGetter" or so)
callable(or, if you need specific reference that it's anonymous function - the\Closure)$lengthis a closure even without it. For variables documentations, see the manual. Normally it's not needed.