Doc #65614 [Opn->Csd]: misleading documentation in php.net: default values by reference
| From: | daverandom@php.net | Date: | Tue, 10 Sep 2013 16:11:57 +0000 |
| Subject: | Doc #65614 [Opn->Csd]: misleading documentation in php.net: default values by reference | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-10245@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=65614&edit=1
ID: 65614
Updated by: daverandom@php.net
Reported by: 4d95cb4a at opayq dot com
Summary: misleading documentation in php.net: default values
by reference
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
-Assigned To:
+Assigned To: daverandom
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2013-09-10 15:26:19] daverandom@php.net
Automatic comment from SVN on behalf of daverandom
Revision: http://svn.php.net/viewvc/?view=revision&revision=331339
Log: From doc bug 65614
This change makes the wording clearer for byref arguments being allowed a default value in the
function signature.
--
Provided by anonymous #33404 (leight@gmail.com)
------------------------------------------------------------------------
[2013-09-04 10:29:24] 4d95cb4a at opayq dot com
Description:
------------
misleading documentation in php.net: Note: As of PHP 5, default values may be
passed by reference:
http://www.php.net/manual/en/functions.arguments.php#functions.arguments.default
what it currently says:
Note: As of PHP 5, default values may be passed by reference.
what is should say:
Note: As of PHP 5, reference arguments may have default values.
Expected result:
----------------
the meaning of the documentation:
function bar(&$baz = 'baz') { }
Actual result:
--------------
from the current documentation you can understand:
function bar($baz = $foo) { } // syntax error
or:
function bar($baz = &$foo) { } // syntax error
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=65614&edit=1