public static function connect($host='localhost', $port=9000) { self::$socket = socket_create(AF_INET, SOCK_STREAM, 0); if (self::$socket) { if (socket_connect(self::$socket, $host, $port)) { socket_set_block(self::$socket); self::$connected = true; } else { $err = socket_strerror(socket_last_error(self::$socket)); throw new DebugClientError('Cannot connect to Debugger server! Reason: '.$err); } } else { throw new DebugClientError('Cannot initialize socket!'); } }
function dbgpRun($data, $commands, array $ini_options = null) { $t = new DebugClient(); $t->runTest($data, $commands, $ini_options); }
function dbgpRun($data, $commands) { $t = new DebugClient(); $t->runTest($data, $commands); }