Doc #77426 [Asn->Csd]: Parentheses and argument list optional with new operator
| From: | pasindu@php.net | Date: | Mon, 11 Feb 2019 00:00:08 +0000 |
| Subject: | Doc #77426 [Asn->Csd]: Parentheses and argument list optional with new operator | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-16394@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=77426&edit=1
ID: 77426
Updated by: pasindu@php.net
Reported by: klimplant at disroot dot org
Summary: Parentheses and argument list optional with new
operator
-Status: Assigned
+Status: Closed
Type: Documentation Problem
Package: Class/Object related
PHP Version: Irrelevant
Assigned To: girgias
Block user comment: N
Private report: N
New Comment:
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
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
http://svn.php.net/viewvc?view=revision&revision=346784
Previous Comments:
------------------------------------------------------------------------
[2019-01-20 17:57:36] girgias@php.net
The following patch has been added/updated:
Patch Name: doc-fix-77426
Revision: 1548007056
URL: https://bugs.php.net/patch-display.php?bug=77426&patch=doc-fix-77426&revision=1548007056
------------------------------------------------------------------------
[2019-01-07 20:36:05] requinix@php.net
I would expect to see it with the docs for the new operator.
http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.new
Note the langspec does account for the syntax.
------------------------------------------------------------------------
[2019-01-07 20:16:39] 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 17:37:12] peehaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
------------------------------------------------------------------------
[2019-01-07 17:31:15] klimplant at disroot dot org
Description:
------------
---
From manual page: https://php.net/ziparchive.addfile
---
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)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=77426&edit=1