|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #77426 Parentheses and argument list optional with new operator
Submitted: 2019-01-07 17:31 UTC Modified: 2019-02-11 00:00 UTC
From: klimplant at disroot dot org Assigned: girgias (profile)
Status: Closed Package: Class/Object related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2019-01-07 17:31 UTC] klimplant at disroot dot org
From manual page:
On the man page for ZipArchive::addFile a new archive is created by using `$zip = new ZipArchive;`, while it should be `$zip = new ZipArchive();` (notice the opening and closing brackets)


doc-fix-77426 (last revision 2019-01-20 17:57 UTC by

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2019-01-07 17:37 UTC]
-Status: Open +Status: Not a bug
 [2019-01-07 17:37 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at
 [2019-01-07 20:16 UTC] a at b dot c dot de
Parentheses are not required after the class name when there are no arguments to be passed to the constructor.

However, this is not mentioned when object creation is described (under "The Basics") nor under "Constructors and Destructors".
 [2019-01-07 20:36 UTC]
-Summary: missing brackets in zipArchive::addFile documentation +Summary: Parentheses and argument list optional with new operator -Status: Not a bug +Status: Open -Package: Documentation problem +Package: Class/Object related
 [2019-01-07 20:36 UTC]
I would expect to see it with the docs for the new operator.

Note the langspec does account for the syntax.
 [2019-01-11 02:40 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: girgias
 [2019-01-20 17:57 UTC]
The following patch has been added/updated:

Patch Name: doc-fix-77426
Revision:   1548007056
 [2019-02-11 00:00 UTC]
-Status: Assigned +Status: Closed
 [2019-02-11 00:00 UTC]
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jun 20 17:01:29 2024 UTC