diff --git a/examples/src/co5.php b/examples/src/co5.php index 95823afc..1fa8734c 100644 --- a/examples/src/co5.php +++ b/examples/src/co5.php @@ -4,11 +4,12 @@ use \Hprose\Future; class Test { - function test() { - yield 123; + function test($x) { + yield $x; } } $test = Future\wrap(new Test()); -$test->test()->then('var_dump'); \ No newline at end of file +$test->test(123)->then('var_dump'); +$test->test(Future\value('hello'))->then('var_dump'); \ No newline at end of file