1--TEST--
2Iterator::key() with by-ref return
3--FILE--
4<?php
5class Test extends ArrayIterator {
6    function &key() {
7        return $foo;
8    }
9}
10foreach (new Test([0]) as $k => $v) {
11    var_dump($k);
12}
13?>
14--EXPECT--
15NULL
16