Client/MemcacheClient.php
public function probeServer($ip, $port)
    {
        $errno = null;
        $errstr = null;
        $fp = @fsockopen($ip, $port, $errno, $errstr, $this->sockttl);

        if ($fp) {
            fclose($fp);

            return true;
        } else {
            return false;
        }
    }
public function probeServer($ip, $port)
    {
        $errno = null;
        $errstr = null;
        $fp = @fsockopen($ip, $port, $errno, $errstr, $this->sockttl);

        if ($fp) {
            fclose($fp);

            return true;
        } else {
            return false;
        }
    }
Spend a few tenths of a second opening a socket to the requested IP and port

The purpose of this is to verify that the server exists before trying to add it,
to cut down on weird errors when doing ->get(). This could be a controversial or
flawed way to go about this.

@param string $ip IP address (or hostname, possibly)
@param int $port Port that memcache is running on
@access public
@return boolean True if the socket opens successfully, or false if it fails