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