rfc:iterable
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:iterable [2016/06/11 14:54] – trowski | rfc:iterable [2016/07/03 14:53] – Closed voting trowski | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== PHP RFC: Iterable ====== | ====== PHP RFC: Iterable ====== | ||
- | * Version: 0.1 | + | * Version: 0.1.1 |
* Date: 2016-06-10 | * Date: 2016-06-10 | ||
* Author: Aaron Piotrowski < | * Author: Aaron Piotrowski < | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
Line 47: | Line 47: | ||
yield 2; | yield 2; | ||
yield 3; | yield 3; | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Classes extending/ | ||
+ | |||
+ | <code php> | ||
+ | interface Example { | ||
+ | public function method(array $array): iterable; | ||
+ | } | ||
+ | |||
+ | class ExampleImplementation implements Example { | ||
+ | public function method(iterable $iterable): array { | ||
+ | // Parameter broadened and return narrowed. | ||
+ | } | ||
} | } | ||
</ | </ | ||
Line 59: | Line 73: | ||
var_dump(is_iterable(new stdClass())); | var_dump(is_iterable(new stdClass())); | ||
</ | </ | ||
+ | |||
+ | ===== Object Iteration ===== | ||
+ | |||
+ | PHP allows any object to be used with '' | ||
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== | ||
Line 75: | Line 93: | ||
===== Voting ===== | ===== Voting ===== | ||
This proposal requires a 2/3 majority to be accepted. | This proposal requires a 2/3 majority to be accepted. | ||
+ | |||
+ | Voting began on 2016-06-24 at 6:00 pm GMT and will remain open until 2016-07-02 at 11:59 pm GMT | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
===== Patches and Tests ===== | ===== Patches and Tests ===== | ||
PR: [[https:// | PR: [[https:// | ||
- |
rfc/iterable.txt · Last modified: 2018/08/07 01:40 by carusogabriel