1--TEST--
2$generator->send() returns the yielded value
3--FILE--
4<?php
5
6function reverseEchoGenerator() {
7    $data = yield;
8    while (true) {
9        $data = (yield strrev($data));
10    }
11}
12
13$gen = reverseEchoGenerator();
14var_dump($gen->send('foo'));
15var_dump($gen->send('bar'));
16
17?>
18--EXPECT--
19string(3) "oof"
20string(3) "rab"
21