rfc:iterable

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
Last revisionBoth sides next revision
rfc:iterable [2016/06/24 18:01] – Open voting and add co/contravariance note trowskirfc:iterable [2017/09/22 13:28] – external edit 127.0.0.1
Line 3: Line 3:
   * Date: 2016-06-10   * Date: 2016-06-10
   * Author: Aaron Piotrowski <aaron@trowski.com>   * Author: Aaron Piotrowski <aaron@trowski.com>
-  * Status: Under Discussion+  * Status: Accepted
   * First Published at: http://wiki.php.net/rfc/iterable   * First Published at: http://wiki.php.net/rfc/iterable
  
Line 50: Line 50:
 </code> </code>
  
-Classes extending/implementing may broaden methods using ''array'' or ''Traversable'' as parameter types to ''iterable'' or narrow return types from ''iterable'' to ''array'' or ''Traversable''.+Classes extending/implementing may broaden methods using ''array'' or ''Traversable'' as parameter types to ''iterable'' or narrow return types from ''iterable'' to ''array'' or ''Traversable''. This behavior is the same as that proposed for all union types in the [[union_types|Union Types RFC]].
  
 <code php> <code php>
Line 57: Line 57:
 } }
  
-class ExampleImplementation {+class ExampleImplementation implements Example {
     public function method(iterable $iterable): array {     public function method(iterable $iterable): array {
         // Parameter broadened and return narrowed.         // Parameter broadened and return narrowed.
Line 94: Line 94:
 This proposal requires a 2/3 majority to be accepted. This proposal requires a 2/3 majority to be accepted.
  
-Voting began on 6/24/16 at 18:00 GMT and will remain open until 7/2/16 at 11:59 GMT+Voting began on 2016-06-24 at 6:00 pm GMT and ended on 2016-07-02 at 11:59 pm GMT
  
-<doodle title="Add iterable type to PHP 7.1" auth="trowski" voteType="single" closed="false">+<doodle title="Add iterable type to PHP 7.1" auth="trowski" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
rfc/iterable.txt · Last modified: 2018/08/07 01:40 by carusogabriel