ID: 12712
Updated by: [EMAIL PROTECTED]
-Summary: a little suggestion
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: Feature/Change Request
Operating System: Windows 2000
PHP Version: 4.0.6
New Comment:
rewrote summary.
Previous Comments:
------------------------------------------------------------------------
[2001-08-13 04:05:59] [EMAIL PROTECTED]
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 this bug report at http://bugs.php.net/?id=12712&edit=1