1--TEST-- 2When + or - are used on yield, they must be unary (and not binary) (Bug #69160) 3--FILE-- 4<?php 5function gen() { 6 var_dump(yield +1); 7 var_dump(yield -1); 8 var_dump(yield * -1); // other ops still should behave normally 9} 10 11for ($gen = gen(); $gen->valid(); $gen->send(1)) { 12 echo "\n"; 13 var_dump($gen->current()); 14} 15?> 16--EXPECT-- 17 18int(1) 19int(1) 20 21int(-1) 22int(1) 23 24NULL 25int(-1) 26 27