| 1 | <?php |
||
| 9 | trait ToArrayTrait |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Returns an unsafe array build from this iterator |
||
| 13 | * |
||
| 14 | * Note that the resulting array may contain overlapping keys! |
||
| 15 | * If this is the case, the resulting array will contain fewer |
||
| 16 | * items than the original iterator! |
||
| 17 | * |
||
| 18 | * A safer option is to use either |
||
| 19 | * - $iterable->keys(), |
||
| 20 | * - $iterable->values(), or |
||
| 21 | * - $iterable->items() |
||
| 22 | * |
||
| 23 | * @return array |
||
| 24 | */ |
||
| 25 | 39 | public function toArray() |
|
| 33 | } |
||
| 34 |