class manage { var $server; var $client; function manage() { $this->server = new control("server"); $this->client = new control("client"); } } class control { function control() { .... } function stop() { ... } } $manage = new manage(); $manage->server->stop();