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
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.

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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 06:01:29 2024 UTC