Just wondering, assuming no security issues, that is, you're in total control of the command passed to exec(), is there a difference (in terms of speed or standards) between using exec() vs native PHP?
Example just to name a few use cases:
Using the DirectoryIterator vs exec(ls -1, $output), to list all files.
List 100 files from the 99th file onwards (that is, file 100 to 199)
Count total number of files in directory.