The Laravel documentation has a LazyCollection::make() example at Lazy Collection documentation
LazyCollection::make(function () {
$handle = fopen('log.txt', 'r');
while (($line = fgets($handle)) !== false) {
yield $line;
}
});
So I’m wondering why there’s no fclose()
call.
In my code I’m using the gzopen()
and it seems very strange to me to not call gzclose()
.
Thanks
I’ve Google and found nothing so I asked my coworkers; nobody knows, so one of them asked Chat-GPT and we can’t get any reliable answer.