isFile() || $file->getExtension() !== 'php') { continue; } $command = sprintf('php -l %s', escapeshellarg($file->getPathname())); passthru($command, $exitCode); if ($exitCode !== 0) { exit($exitCode); } } }