1--TEST--
2A notice is thrown when yielding a constant value by reference
3--FILE--
4<?php
5
6function &gen() {
7    yield "foo";
8}
9
10$gen = gen();
11var_dump($gen->current());
12
13?>
14--EXPECTF--
15Notice: Only variable references should be yielded by reference in %s on line %d
16string(3) "foo"
17