bug53144.phpt 273 B

1234567891011121314151617181920
  1. --TEST--
  2. Bug #53144 (Segfault in SplObjectStorage::removeAll)
  3. --FILE--
  4. <?php
  5. $o1 = new StdClass;
  6. $o2 = new StdClass;
  7. $b = new SplObjectStorage();
  8. $b[$o1] = "bar";
  9. $b[$o2] = "baz";
  10. var_dump(count($b));
  11. $b->removeAll($b);
  12. var_dump(count($b));
  13. ?>
  14. --EXPECT--
  15. int(2)
  16. int(0)