Finder::sort()

Finder|SplFileInfo[] sort(Closure $closure)

Sorts files and directories by an anonymous function.

The anonymous function receives two \SplFileInfo instances to compare.

This can be slow as all the matching files and directories must be retrieved for comparison.

Parameters

Closure $closure An anonymous function

Return Value

Finder|SplFileInfo[] The current Finder instance

See also

SortableIterator
doc_Symfony
2016-10-28 06:16:55
Comments
Leave a Comment

Please login to continue.