The documentation for glob doesn't mention what order (if any) it returns the array of pathnames in, however, it does mention a flag that allows you to disable sorting.
GLOB_NOSORT - Return files as they appear in the directory (no sorting)
How is the array sorted by glob
when when the GLOB_NOSORT
flag is not used?