" . "(?'paramValue'.*?)<\/param:\\1\s*>/s", function(array $matches) use (&$params) { $params[$matches['paramName']] = $matches['paramValue']; return ""; }, $pageContents )); unset($pageContents); ob_start(); include SRCDIR . "/template.php"; $output = ob_get_clean(); if ($output === false) $output = ""; if (is_file($page)) unlink($page); return $output; }