GeneratorDemo.php 270 B

123456789101112131415161718192021
  1. <?php
  2. namespace Symfony\Component\VarDumper\Tests\Fixtures;
  3. class GeneratorDemo
  4. {
  5. public static function foo()
  6. {
  7. yield 1;
  8. }
  9. public function baz()
  10. {
  11. yield from bar();
  12. }
  13. }
  14. function bar()
  15. {
  16. yield from GeneratorDemo::foo();
  17. }