1--TEST--
2Observer: Unused retvals from generators are still observable
3--EXTENSIONS--
4zend_test
5--INI--
6zend_test.observer.enabled=1
7zend_test.observer.show_output=1
8zend_test.observer.observe_all=1
9zend_test.observer.show_return_value=1
10--FILE--
11<?php
12function foo() {
13    yield 'I should be observable';
14    yield 'Me too!';
15}
16
17$gen = foo();
18$gen->current();
19$gen->next();
20$gen->current();
21
22echo 'Done' . PHP_EOL;
23?>
24--EXPECTF--
25<!-- init '%s%eobserver_retval_%d.php' -->
26<file '%s%eobserver_retval_%d.php'>
27  <!-- init foo() -->
28  <foo>
29  </foo:'I should be observable'>
30  <foo>
31  </foo:'Me too!'>
32Done
33</file '%s%eobserver_retval_%d.php'>
34