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