Skip to content

Commit

Permalink
Update co5.php
Browse files Browse the repository at this point in the history
  • Loading branch information
andot committed Jul 24, 2016
1 parent 15bbf1a commit 380968f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/src/co5.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
$test->test(123)->then('var_dump');
$test->test(Future\value('hello'))->then('var_dump');

0 comments on commit 380968f

Please sign in to comment.