php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #54079 Missing documentation
Submitted: 2011-02-23 14:34 UTC Modified: 2011-12-05 09:41 UTC
From: vitoandre dot doria at gmail dot com Assigned: frozenfire (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Windows 7
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: vitoandre dot doria at gmail dot com
New email:
PHP Version: OS:

 

 [2011-02-23 14:34 UTC] vitoandre dot doria at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/manual/en/book.zip.php
---

The above page or one of the PHP (not user contributed!) examples should include some notes on the "numFiles" iterator! imho

Somethings like in "Test script:" section.
I had to look onto a different site to find out how the zip iteration works.
There are not enough examples. (or lets say they aim nearly all at the same topic).

I would expect to find on the above site a note or maybe a link to an sample like for the rest.

Regards
VAD

Test script:
---------------
<?php
// Use numFiles to loop through the Items

if ($zip->open('test.zip') == TRUE) {
    for ($i = 0; $i < $zip->numFiles; $i++;) {
        $filename = $zip->getNameIndex($i);
        // Fancy code....
    }
}
?>


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-12-05 09:40 UTC] frozenfire@php.net
Automatic comment from SVN on behalf of frozenfire
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=320405
Log: Added example. Closes bug #54079.
 [2011-12-05 09:41 UTC] frozenfire@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: frozenfire
 [2011-12-05 09:41 UTC] frozenfire@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 06:00:01 2026 UTC