rfc:intersection_types

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
Next revisionBoth sides next revision
rfc:intersection_types [2016/04/27 17:40] levimrfc:intersection_types [2016/04/28 03:55] levim
Line 3: Line 3:
   * Date: 2016-04-27   * Date: 2016-04-27
   * Author: Levi Morrison <levim@php.net>   * Author: Levi Morrison <levim@php.net>
-  * Status: Draft+  * Status: Under Discussion
   * First Published at: http://wiki.php.net/rfc/intersection_types   * First Published at: http://wiki.php.net/rfc/intersection_types
  
Line 29: Line 29:
  
 // Fatal error: Uncaught TypeError: Argument 1 passed to RecordsToList() must be Countable and Traversable, array given, called in %s on line %d // Fatal error: Uncaught TypeError: Argument 1 passed to RecordsToList() must be Countable and Traversable, array given, called in %s on line %d
-echo RecordsToHtml(["Lennon", "McCartney", "Starr", "Harrison"]);+echo RecordsToList(["Lennon", "McCartney", "Starr", "Harrison"]);
  
 // Fine: // Fine:
-echo RecordsToHtml(new ArrayObject(["Lennon", "McCartney", "Starr", "Harrison"]));+echo RecordsToList(new ArrayObject(["Lennon", "McCartney", "Starr", "Harrison"]));
 // Output: // Output:
 // <ol> // <ol>
Line 62: Line 62:
  
 <PHP> <PHP>
-function RecordsToHtml(Array | Countable & Traversable): String {+function RecordsToList(Array | Countable & Traversable): String {
     // ...     // ...
 } }
Line 86: Line 86:
  
 ===== References ===== ===== References =====
-Original announcement on Mailing List of rationale for this feature: http://news.php.net/php.internals/92252+  * Original announcement on Mailing List of rationale for this feature: http://news.php.net/php.internals/92252 
 +  * Announcement for discussion phase: http://news.php.net/php.internals/92857
  
rfc/intersection_types.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1