isDir()) continue; if ($file->getExtension() === 'php') { echo $file->getPathname() . "\n"; } }