php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #20544 set function arguments by name
Submitted: 2002-11-21 07:25 UTC Modified: 2002-11-21 07:26 UTC
Votes:5
Avg. Score:5.0 ± 0.0
Reproduced:5 of 5 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (20.0%)
From: z95kahe at mtek dot chalmers dot se Assigned:
Status: Wont fix Package: Feature/Change Request
PHP Version: 4.2.3 OS: WindowsXP
Private report: No CVE-ID: None
 [2002-11-21 07:25 UTC] z95kahe at mtek dot chalmers dot se
I realy think it would be nice to be able to set function arguments by their name. Especially when you have default arguments in a function.

An example:
function aaa( a = 'A', b = 'B', c = 'C' ) {
}

aaa( b -> 'D' );

Would call function aaa, set argument b to 'D' and leave the other arguments unchanged.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-21 07:26 UTC] derick@php.net
This was discussed before -> won't be implemented.

Derick
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 18:01:31 2024 UTC