|  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.
Block user comment
Status: Assign to:
Bug Type:
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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-01 00:11 UTC]
-Status: Open +Status: Wont fix -Package: Feature/Change Request +Package: Scripting Engine problem
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Dec 01 03:03:40 2021 UTC