open($filePath)) { throw new IOException("Could not open {$filePath} for reading."); } $outputFolder = __DIR__ . '/extracted_zip'; mkdir($outputFolder); $zip->extractTo($outputFolder);