From: Bob Weinand Date: Sat, 7 Mar 2015 19:59:42 +0000 (+0100) Subject: Added test for bug #69160 (current behavior is correct) X-Git-Tag: PRE_PHP7_NSAPI_REMOVAL~774 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b1cd381f011e2437a0ad57031ef92ede69f319b3;p=php Added test for bug #69160 (current behavior is correct) --- diff --git a/Zend/tests/generators/yield_unary_precedence.phpt b/Zend/tests/generators/yield_unary_precedence.phpt new file mode 100644 index 0000000000..9357168c80 --- /dev/null +++ b/Zend/tests/generators/yield_unary_precedence.phpt @@ -0,0 +1,26 @@ +--TEST-- +When + or - are used on yield, they must be unary (and not binary) (Bug #69160) +--FILE-- +valid(); $gen->send(1)) { + echo "\n"; + var_dump($gen->current()); +} +?> +--EXPECT-- + +int(1) +int(1) + +int(-1) +int(1) + +NULL +int(-1) +