From c70c156ca1b404fe183fef05d24bb87b12cbd4c3 Mon Sep 17 00:00:00 2001 From: krakjoe Date: Mon, 18 Nov 2013 10:32:33 +0000 Subject: [PATCH] seek ZEND_YIELD --- phpdbg_prompt.c | 6 ++++++ test.php | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index a36cb2460c..66293e3a9f 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -340,6 +340,9 @@ static PHPDBG_COMMAND(finish) /* {{{ */ case ZEND_RETURN: case ZEND_THROW: case ZEND_EXIT: +#ifdef ZEND_YIELD + case ZEND_YIELD: +#endif zend_hash_index_update( &PHPDBG_G(seek), (zend_ulong) &EG(active_op_array)->opcodes[next], @@ -371,6 +374,9 @@ static PHPDBG_COMMAND(leave) /* {{{ */ case ZEND_RETURN: case ZEND_THROW: case ZEND_EXIT: +#ifdef ZEND_YIELD + case ZEND_YIELD: +#endif zend_hash_index_update( &PHPDBG_G(seek), (zend_ulong) &EG(active_op_array)->opcodes[next], diff --git a/test.php b/test.php index dc1ecdb955..870f9f4188 100644 --- a/test.php +++ b/test.php @@ -30,7 +30,8 @@ $test = 1; var_dump( $dbg->isGreat("PHP Rocks !!")); -test(); +foreach (test() as $gen) + continue; echo "it works!\n"; -- 2.50.1