Skip to content
Snippets Groups Projects

Ptps function 9

Merged Адлан Шамавов requested to merge PTPS_Function_9 into main
1 unresolved thread

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
src/Functions.php 0 → 100644
180 /**
181 * Переделай своё решение 8 задачи:
182 * замени вывод всего текста из файла разом на
183 * построчный вывод используя yield
184 * @param string $filePath путь до файла
185 * @return void
186 */
187 function readFileLineByLine(string $filePath): iterable {
188 if (file_exists($filePath)) {
189 $file = fopen($filePath, "r");
190 while(!feof($file)) {
191 yield fgets($file);
192 }
193 fclose($file);
194 }
195 else yield "Такого файла не существует.";
  • added 2 commits

    Compare with previous version

  • added 8 commits

    Compare with previous version

  • added 9 commits

    Compare with previous version

  • added 52 commits

    Compare with previous version

  • mentioned in commit 5ab8e00d

  • Please register or sign in to reply
    Loading