Code Duplication    Length = 5-6 lines in 2 locations

Sources/CacheAPI-memcache.php 1 location

@@ 66-71 (lines=6) @@
63
			// Normal host names do not contain slashes, while e.g. unix sockets do. Assume alternative transport pipe with port 0.
64
			if (strpos($server,'/') !== false)
65
				$host = $server;
66
			else
67
			{
68
				$server = explode(':', $server);
69
				$host = $server[0];
70
				$port = isset($server[1]) ? $server[1] : 11211;
71
			}
72
73
			// Don't wait too long: yes, we want the server, but we might be able to run the query faster!
74
			if (empty($db_persist))

Sources/CacheAPI-memcached.php 1 location

@@ 59-63 (lines=5) @@
56
		{
57
			if (strpos($server,'/') !== false)
58
				$tempServer = array($server, 0);
59
			else
60
			{
61
				$server = explode(':', $server);
62
				$tempServer = array($server[0], isset($server[1]) ? $server[1] : 11211);
63
			}
64
65
			// Figure out if we have this server or not
66
			$foundServer = false;