code: private function extractFilenames(\ZipArchive $zipArchive)
      {
          $filenames = array();
          $fileCount = $zipArchive->numFiles;
  
          for ($i = 0; $i < $fileCount; $i++) {
              if (($filename = $this->extractFilename($zipArchive, $i)) !== false) {
                  $filenames[] = $filename;
              }
          }
  
          return $filenames;
      }
docs: Extract list of filenames from .zip
  
  @param \ZipArchive $zipArchive
  
  @return array