ID: 17076 Comment by: pete at teamlupus dot hu Reported By: csaba at alum dot mit dot edu Status: Suspended Bug Type: Feature/Change Request Operating System: All PHP Version: 4.2.0 New Comment:
Hi, is there any follow-up on this subject? It's a really must-have IMHO, just very unfortunate that it needs a major change to the engine :( Is it an issue with the new Zend engine in PHP5, too? Previous Comments: ------------------------------------------------------------------------ [2002-05-07 14:30:38] [EMAIL PROTECTED] This is not one of the easily done changes to the engine and to the language. This has come up before a few times in the past and I suggest participating discussion about this on either php-dev or the engine2 mailing list. Suspending until a final consensus is reach (if not already and I just missed it). ------------------------------------------------------------------------ [2002-05-07 12:51:59] csaba at alum dot mit dot edu This is an enhancement request for about the only thing that I can think of offhand that exists in VB that I really miss in PHP: I would like to be able to declare, say, function myFunc ($arg0, $arg1="One", $arg2="Two", $arg3=3) and call it thusly: myFunc ("Hi", , "Mom") In other words, if I omit an argument to a function where the value is defaulted (in our example we are talking about position 1, in addition to position 3), PHP should take the default value instead of complaining. Of course I can always figure out what the default value was in the first place by checking the function definition and plunking it into my call explicitely, but isn't this the same convenience that the current method tries to offer us? This is just a proposal to extend it. Motivation: This comes up frequently for me because I have several functions which take 3 parameters which are normally defaulted, and usually at most one varies. So unless it's the first of the three, I have to fill in extra values that distract from what's going on. Thanks for considering this, Csaba Gabor ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17076&edit=1