ID: 48268
Updated by: [email protected]
Reported By: zyss at mail dot zp dot ua
-Status: Open
+Status: Bogus
Bug Type: Feature/Change Request
Operating System: Irrelevant
PHP Version: 5.2.9
New Comment:
This has been discussed multiple times ad is not planned for future
releases. Please check archives of the "internals" list for in-depth
discussions and arguements.
Previous Comments:
------------------------------------------------------------------------
[2009-05-13 20:20:25] zyss at mail dot zp dot ua
Description:
------------
I propose to add a special syntax (simplification) for a function
declared with just one argument. The idea is to remove array with its
brackets ( ) in the function call to improve readability and get rid of
unneeded array keyword. This feature is expected by many people who use
such type of functions as a replacement of the PHP's missing feature to
specify function's arguments by name.
For example:
function setParams(array $params) { /*...*/ }
Current call:
setParams(array('name' => 'foo', 'width' => 300, 'height' => 150));
Proposed call:
setParams('name' => 'foo', 'width' => 300, 'height' => 150);
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48268&edit=1