Skip to content

Commit c23bbe7

Browse files
committed
minor #19101 Add sleep to observe the changes in the terminal when executing the code (sungvadan)
This PR was submitted for the 6.4 branch but it was merged into the 5.4 branch instead. Discussion ---------- Add sleep to observe the changes in the terminal when executing the code Add sleep() to observe the changes in the terminal when executing the code When I copy and execute the code in the terminal, it runs too quickly, and I don't see anything appearing on the terminal. I struggle for a moment to understand the behavior of the 'output section.' <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `6.x` for features of unreleased versions). --> Commits ------- 95ad8ec Add sleep to observe the changes in the terminal when executing the code.
2 parents a505d27 + 95ad8ec commit c23bbe7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

console.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,19 +346,23 @@ method, which returns an instance of
346346

347347
$section1->writeln('Hello');
348348
$section2->writeln('World!');
349+
sleep(1);
349350
// Output displays "Hello\nWorld!\n"
350351

351352
// overwrite() replaces all the existing section contents with the given content
352353
$section1->overwrite('Goodbye');
354+
sleep(1);
353355
// Output now displays "Goodbye\nWorld!\n"
354356

355357
// clear() deletes all the section contents...
356358
$section2->clear();
359+
sleep(1);
357360
// Output now displays "Goodbye\n"
358361

359362
// ...but you can also delete a given number of lines
360363
// (this example deletes the last two lines of the section)
361364
$section1->clear(2);
365+
sleep(1);
362366
// Output is now completely empty!
363367

364368
return Command::SUCCESS;

0 commit comments

Comments
 (0)