bug66041.phpt 330 B

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