|  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
Have you experienced this issue?
Rate the importance of this bug to you:

 [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-2022 The PHP Group
All rights reserved.
Last updated: Sun May 22 07:03:37 2022 UTC