Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/19/2023 in all areas

  1. You can "yield from" another generator. private function getTextFiles(File $file):\Generator { foreach($file->getChildren() as $child) { if($child instanceof IsTextFile) { yield $child; } else { yield from $this->getTextFiles($child); } } }
    1 point
This leaderboard is set to New York/GMT-05:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.