--TEST-- HttpRequestPool detaching in callbacks --SKIPIF-- --FILE-- detach($this); } } class r2 extends HttpRequest { function onFinish() { $GLOBALS['p']->detach($this); } } $p = new HttpRequestPool(new r1("at.php.net"), new r2("de.php.net")); $p->send(); var_dump($p->getAttachedRequests()); echo "Done\n"; ?> --EXPECTF-- %sTEST array(0) { } Done