|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #65614 misleading documentation in default values by reference
Submitted: 2013-09-04 10:29 UTC Modified: 2013-09-10 16:11 UTC
From: 4d95cb4a at opayq dot com Assigned: daverandom (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2013-09-04 10:29 UTC] 4d95cb4a at opayq dot com
misleading documentation in Note: As of PHP 5, default values may be 
passed by reference:

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

function bar($baz = &$foo) { } // syntax error


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-09-10 15:26 UTC]
Automatic comment from SVN on behalf of daverandom
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 (
 [2013-09-10 16:11 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: daverandom
 [2013-09-10 16:11 UTC]
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-2024 The PHP Group
All rights reserved.
Last updated: Wed Feb 28 22:01:27 2024 UTC