protected function removeStream($stream, &$pool) { $index = array_search($stream, $pool, true); if ($index !== false) { unset($pool[$index]); } }