rfc:named_params

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:named_params [2020/07/06 14:45] nikicrfc:named_params [2022/05/26 15:31] (current) – Revert previous accidental change iquito
Line 2: Line 2:
   * Date: 2013-09-06, significantly updated 2020-05-05   * Date: 2013-09-06, significantly updated 2020-05-05
   * Author: Nikita Popov <nikic@php.net>   * Author: Nikita Popov <nikic@php.net>
-  * Status: Under Discussion+  * Status: Implemented
   * Target Version: PHP 8.0   * Target Version: PHP 8.0
   * Implementation: https://github.com/php/php-src/pull/5357   * Implementation: https://github.com/php/php-src/pull/5357
Line 331: Line 331:
 </PHP> </PHP>
  
-These calls are subject to the same restrictions as normal suchs, for example there may not be positional arguments after named arguments.+These calls are subject to the same restrictions as normal, for example there may not be positional arguments after named arguments.
  
 For ''call_user_func_array()'', this behavior constitutes a minor backwards-compatibility break: Previously, array keys were completely ignored by this function. Now, string keys will be interpreted as parameter names. For ''call_user_func_array()'', this behavior constitutes a minor backwards-compatibility break: Previously, array keys were completely ignored by this function. Now, string keys will be interpreted as parameter names.
Line 415: Line 415:
 As previously mentioned, this approach is also used by some existing languages, most notably Python, which is one of the languages with the heaviest usage of named arguments. This is hard evidence that such an approach does work reasonably well in practice, though of course the situations are somewhat different. As previously mentioned, this approach is also used by some existing languages, most notably Python, which is one of the languages with the heaviest usage of named arguments. This is hard evidence that such an approach does work reasonably well in practice, though of course the situations are somewhat different.
  
-The [[#to_parameter_name_changes_during_inheritance|alternatives section]] describes a possible alternative that is not pursued by this RFC, but could be added lateron if we felt a strong need.+The [[#to_parameter_name_changes_during_inheritance|alternatives section]] describes a possible alternative that is not pursued by this RFC, but could be added later on if we felt a strong need.
  
 ==== Internal functions ==== ==== Internal functions ====
Line 739: Line 739:
 ===== Vote ===== ===== Vote =====
  
-Primary votes: Yes/No+Voting opened 2020-07-10 and closes 2020-07-24. A 2/3 majority is required. 
 + 
 +<doodle title="Add named argument support?" auth="nikic" voteType="single" closed="true"> 
 +   * Yes 
 +   No 
 +</doodle>
  
 ===== Changelog ===== ===== Changelog =====
rfc/named_params.1594046708.txt.gz · Last modified: 2020/07/06 14:45 by nikic