Hydrolyzes maltose-6'-phosphate and trehalose-6'-phosphate. Is involved in the catabolism of alpha-glycosides accumulated via a phosphoenolpyruvate-dependent maltose phosphotransferase system (PEP-PTS). Is also able to significantly catalyze the hydrolysis of both 6-phospho-alpha- and 6-phospho-beta-glucosides containing activated leaving groups such as p-nitrophenol and does so with retention and inversion, respectively, of the substrate anomeric configuration