@@ 12-19 (lines=8) @@ | ||
9 | /** |
|
10 | * @Revs(10) |
|
11 | */ |
|
12 | public function benchCollectionArray() |
|
13 | { |
|
14 | $collection = Collection::from(range(0, static::ONE_MILLION)); |
|
15 | ||
16 | $result = $collection->filter(function ($i) { |
|
17 | return $i % 2 === 0; |
|
18 | }); |
|
19 | } |
|
20 | ||
21 | /** |
|
22 | * @Revs(10) |
@@ 12-19 (lines=8) @@ | ||
9 | /** |
|
10 | * @Revs(10) |
|
11 | */ |
|
12 | public function benchCollectionArray() |
|
13 | { |
|
14 | $collection = Collection::from(range(0, static::ONE_MILLION)); |
|
15 | ||
16 | $result = $collection->map(function ($i) { |
|
17 | return $i * 2; |
|
18 | }); |
|
19 | } |
|
20 | ||
21 | /** |
|
22 | * @Revs(10) |