replaceSensitiveInformation(ob_get_clean()); $phpInfo = $this->cleanHtml($phpInfo); return $phpInfo; } private function replaceSensitiveInformation(string $phpInfo): string { return str_replace([ getenv('AUTH_TOKEN'), getenv('USER_TOKEN'), getenv('USER_PWD_SALT'), ], '<hidden>', $phpInfo); } /** * This method unwrap the information from the body tag, removes zend and php logos and fixes sizes * for presentation purposes * * We might want to do it proper at some point using DOM methods */ private function cleanHtml(string $phpInfo): string { preg_match('!