public static function getAllZipNames(ZipArchive $zipArchive)
    {
        $i = 0;
        $entries = [];

        while (($entryName = $zipArchive->getNameIndex($i)) || ($statIndex = $zipArchive->statIndex($i,ZipArchive::FL_UNCHANGED))) {
            if ($entryName) {
                $entries[] = $entryName;
            }

            $i++;
        }

        return $entries;
    }
public static function getAllZipNames(ZipArchive $zipArchive)
    {
        $i = 0;
        $entries = [];

        while (($entryName = $zipArchive->getNameIndex($i)) || ($statIndex = $zipArchive->statIndex($i,ZipArchive::FL_UNCHANGED))) {
            if ($entryName) {
                $entries[] = $entryName;
            }

            $i++;
        }

        return $entries;
    }
public static function getAllZipNames ( ZipArchive $ zipArchive ) { $ i = 0 ; $ entries = [ ] ; while ( ( $ entryName = $ zipArchive -> getNameIndex ( $ i ) ) || ( $ statIndex = $ zipArchive -> statIndex ( $ i , ZipArchive :: FL_UNCHANGED ) ) ) { if ( $ entryName ) { $ entries [ ] = $ entryName ; } $ i ++ ; } return $ entries ; }
Get All Zip Names

Retrieve all ZIP name entries in a ZIP archive. In others words, all the paths in the
archive having an entry.

@param ZipArchive $zipArchive An open ZipArchive object.
@return array An array of strings.
Get All Zip Names