php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #65614 misleading documentation in php.net: 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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: 4d95cb4a at opayq dot com
New email:
PHP Version: OS:

 

 [2013-09-04 10:29 UTC] 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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-09-10 15:26 UTC] 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-10 16:11 UTC] daverandom@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: daverandom
 [2013-09-10 16:11 UTC] daverandom@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-2024 The PHP Group
All rights reserved.
Last updated: Sun Nov 24 01:01:29 2024 UTC