From: [EMAIL PROTECTED]
Operating system: Windows 2000
PHP version: 4.0.6
PHP Bug Type: *General Issues
Bug description: a little suggestion
Good day. It is not a really bug report but a little suggestion for new PHP
relase. I'll be good thing to add to PHP
language ability to create functions with named parameters like in Visual
Basic. For example:
//Classic function:
function printhello($name, $bold = false, $italic = false)
{
$ret = "Hello $name!"
if ($bold)
$ret = "<strong>$ret</strong>";
if ($italic)
$ret = "<em>$ret</em>";
echo $ret;
}
//Suggested function:
function printhello(name: $name, fat: $bold = false, emphased: $italic =
false)
{
// same body as above ...
}
This new function could be called like: printhello("Martin", true);
or like new: printhello(fat: true, name: "Martin");
Thank you.
--
Edit bug report at: http://bugs.php.net/?id=12712&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]