setPreserveComments(false); // Optional variables (future-proofed) $rawVars = []; $vars = []; if (isset($rawVars['replacements'])) { foreach ($rawVars['replacements'] as $key => $val) { if (strpos($key, '__') === 0 && substr($key, -2) === '__') { $vars['ini_' . substr($key, 2, -2)] = $val; } } } if (!empty($vars)) { $less->setVariables($vars); } echo $less->compile($css); } catch (Exception $e) { error_log("[css.php] Exception: " . $e->getMessage()); http_response_code(500); header('Content-Type: text/css; charset=utf-8'); echo "/* An error occurred while processing the CSS. */"; }