1--TEST-- 2Check that SplObjectStorage::removeUncommon functions when receiving proper input 3--CREDITS-- 4Matthew Turland (me@matthewturland.com) 5--FILE-- 6<?php 7 8$a = (object) 'a'; 9$b = (object) 'b'; 10$c = (object) 'c'; 11 12$foo = new SplObjectStorage; 13$foo->attach($a); 14$foo->attach($b); 15 16$bar = new SplObjectStorage; 17$bar->attach($b); 18$bar->attach($c); 19 20$foo->removeAllExcept($bar); 21var_dump($foo->contains($a)); 22var_dump($foo->contains($b)); 23 24?> 25--EXPECT-- 26bool(false) 27bool(true) 28