rfc:intersection_types

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rfc:intersection_types [2016/04/28 14:21]
levim Add 3v4l.org links
rfc:intersection_types [2017/09/22 13:28] (current)
Line 47: Line 47:
 </​PHP>​ </​PHP>​
  
-Note that if [[rfc:​union_types|Union Types]] are also accepted then something like this will be possible, allowing for an array or an object that satisfies both Countable and Traversable:​+Note that if [[rfc:​union_types|Union Types]] are also accepted then something like this will be possible((The experimental patch provided by Joe and Bob currently does not support mixing unions and intersections)), allowing for an array or an object that satisfies both Countable and Traversable:​
 <PHP> <PHP>
 function RecordsToList(Array | (Countable & Traversable) $input): String { function RecordsToList(Array | (Countable & Traversable) $input): String {
Line 66: Line 66:
  
 <PHP> <PHP>
-function RecordsToList(Array | Countable & Traversable):​ String {+function RecordsToList(Array | Countable & Traversable ​$input): String {
     // ...     // ...
 } }
rfc/intersection_types.1461853298.txt.gz · Last modified: 2017/09/22 13:28 (external edit)