<?php function yieldMe() : iterable { yield 1; yield 2; yield 3; } function someFunction(bool $toArray=true) : iterable { $found = yieldMe(); if($toArray){ return yield from iterator_to_array($found); } yield from $found; } $result = someFunction(); foreach($result as $r){ echo $r."\n"; }
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`