php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #15095 use of references in arguments with defaults
Submitted: 2002-01-18 03:48 UTC Modified: 2011-01-01 00:11 UTC
From: gusito at cwadv dot com Assigned:
Status: Wont fix Package: Scripting Engine problem
PHP Version: 4.1.1 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: gusito at cwadv dot com
New email:
PHP Version: OS:

 

 [2002-01-18 03:48 UTC] gusito at cwadv dot com
I would like to be able to define a function with a 
referenced argument as well as give it a default value.

function foo(&$bar = NULL) {}

So, what will it reference, you ask? Nothing. I just want 
the argument to be optional, but to reference if there is 
an argument supplied. So, it's less of a default that's 
needed for references, more the ability to have the 
argument be optional.

This would make me so happy.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-01 00:11 UTC] jani@php.net
-Status: Open +Status: Wont fix -Package: Feature/Change Request +Package: Scripting Engine problem
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC