Open chanmix51 opened 7 years ago
To sum it up: the result iterator proposes a extract()
method to materialize the result set as an array (to use mainly with json_encode
). Why then use extract
if an iterator (or a generator) is needed? Why not directly use the iterator?
The
extract()
method in result iterator stores all the result in an array, this uses a lot of memory. It would be better to use a generator here (PHP 5.5).