What alternative method did the user discover to extract all zip files in a folder?
The user discovered that they can use the PHP ZipArchive class to extract all zip files in a folder. This class provides methods to open, extract, and close zip archives. By iterating through all the files in the folder and checking if they are zip files, the user can extract them using the ZipArchive class.
$folderPath = 'path/to/folder';
$zip = new ZipArchive();
if ($handle = opendir($folderPath)) {
while (false !== ($entry = readdir($handle))) {
if ($entry != "." && $entry != ".." && pathinfo($entry, PATHINFO_EXTENSION) == 'zip') {
$zip->open($folderPath . '/' . $entry);
$zip->extractTo($folderPath);
$zip->close();
}
}
closedir($handle);
}