bug70053.phpt 506 B

123456789101112131415161718192021
  1. --TEST--
  2. SPL: ArrayObject
  3. --FILE--
  4. <?php
  5. echo "-- Two empty iterators attached with infos that are different but same array key --\n";
  6. $mit = new MultipleIterator(MultipleIterator::MIT_KEYS_ASSOC);
  7. $mit ->attachIterator(new EmptyIterator(), "2");
  8. $mit ->attachIterator(new EmptyIterator(), 2);
  9. var_dump($mit->countIterators());
  10. $mit->rewind();
  11. var_dump($mit->current());
  12. ?>
  13. --EXPECT--
  14. -- Two empty iterators attached with infos that are different but same array key --
  15. int(2)
  16. array(1) {
  17. [2]=>
  18. NULL
  19. }