|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-05-13 22:22 UTC] johannes@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 11 11:00:01 2025 UTC |
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);