-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbig.php
40 lines (36 loc) · 1.31 KB
/
big.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
require(__DIR__.'/../vendor/autoload.php');
$chunks = (new \DocteurKlein\JsonChunks\Encode)([
'product' => function() {
for ($i = 1; $i < 10; $i++) {
yield function() {
for ($i = 1; $i < 10; $i++) {
yield function() {
for ($i = 1; $i < 10; $i++) {
yield ['a', 'b', 'e', function() {
for ($i = 1; $i < 10; $i++) {
yield function() {
for ($i = 1; $i < 10; $i++) {
yield function() {
for ($i = 1; $i < 10; $i++) {
yield 'd' => new model;
yield from [ 'a' => 1, 'b' => 2, 'c' => 3];
}
};
}
};
}
}];
}
};
}
};
}
},
]);
class model {
public $test = 'yes';
}
foreach ($chunks as $chunk) {
echo $chunk;
}