#24153 [Opn->WFx]: Use default parameters in the middle while overriding def parameters at the end

From: Date: Thu, 12 Jun 2003 17:11:41 +0000
Subject: #24153 [Opn->WFx]: Use default parameters in the middle while overriding def parameters at the end
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-41786@lists.php.net to get a copy of this message
ID: 24153 Updated by: derick@php.net Reported By: php at electricsurfer dot com -Status: Open +Status: Wont fix Bug Type: Feature/Change Request Operating System: WIN XP PHP Version: 4.3.2 New Comment: This was brought up before and it was decided not to do this. Previous Comments: ------------------------------------------------------------------------ [2003-06-12 11:04:39] php at electricsurfer dot com Description: ------------ Given: <? function myfunc($arg1,$arg2=2,$arg3='',$arg4=false,$arg5=1) {...} ?> It would be nice to be able to do this: <? myfunc('arg1',5,,true); ?> Which would keep the default values for arguments 3 & 5 but specify a value for argument 4. This way, if I ever change the default value of $arg3 from '' to null, I have less code to modify. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24153&edit=1

« previous php.bugs (#41786) next »