xref: /php-src/Zend/tests/generators/bug66041.phpt (revision 9589cae8)
1--TEST--
2Bug #66041: list() fails to unpack yielded ArrayAccess object
3--FILE--
4<?php
5function dumpElement() {
6    list($value) = yield;
7    var_dump($value);
8};
9
10$fixedArray = new SplFixedArray(1);
11$fixedArray[0] = 'the element';
12
13$generator = dumpElement();
14$generator->send($fixedArray);
15?>
16--EXPECT--
17string(11) "the element"
18