--TEST-- Test adding / removing items --SKIPIF-- --FILE-- add($z, ZMQ::POLL_IN); $fp_id = $poll->add($stream, ZMQ::POLL_IN | ZMQ::POLL_OUT); var_dump($obj_id, $fp_id, $poll->count()); $readable = array(); $writable = array(); $poll->poll($readable, $writable, 1000); var_dump($readable, $writable); fclose ($stream); fclose ($socket_client); fclose ($socket_server); var_dump($poll->poll($readable, $writable, 1000)); var_dump($poll->getLastErrors()); $poll->remove($fp_id); $poll->clear(); var_dump($poll->count()); --EXPECTF-- string(34) "o:%s" string(3) "r:%d" int(2) array(1) { [0]=> resource(%d) of type (stream) } array(1) { [0]=> resource(%d) of type (stream) } int(1) array(1) { [0]=> string(3) "r:%d" } int(0)