まさに誰得。 class MemcachedServer { protected $command; public function __construct(MemcachedCommand $command){ $this->command = $command; } public function start(){ $this->run(); } public function run(){ $socket = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP); if(false === $socket){ $code = socket_last_error(); $msg = socket_strerror($code); throw new Exception(sprintf('socket_create was error(%s):%s'