bug41691.phpt 461 B

1234567891011121314151617181920212223242526272829
  1. --TEST--
  2. Bug #41691 (ArrayObject::exchangeArray hangs Apache)
  3. --FILE--
  4. <?php
  5. class A extends ArrayObject {
  6. public function __construct($dummy, $flags) {
  7. parent::__construct($this, $flags);
  8. }
  9. public $a;
  10. public $b;
  11. public $c;
  12. }
  13. $a = new A(null, ArrayObject::ARRAY_AS_PROPS );
  14. var_dump($a->exchangeArray(array('a'=>1,'b'=>1,'c'=>1)));
  15. echo "Done\n";
  16. ?>
  17. --EXPECT--
  18. array(3) {
  19. ["a"]=>
  20. NULL
  21. ["b"]=>
  22. NULL
  23. ["c"]=>
  24. NULL
  25. }
  26. Done