blob: d94422413496a926c68bada96910845fc0bf8e65 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
--TEST--
Bug #66041: list() fails to unpack yielded ArrayAccess object
--FILE--
<?php
function dumpElement() {
list($value) = yield;
var_dump($value);
};
$fixedArray = new SplFixedArray(1);
$fixedArray[0] = 'the element';
$generator = dumpElement();
$generator->send($fixedArray);
?>
--EXPECT--
string(11) "the element"
|