mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-16 02:30:09 +03:00
[OPTIMISATION] No reason to str_replace twice.
This commit is contained in:
@@ -34,7 +34,7 @@ class Request {
|
||||
$headers = array();
|
||||
foreach ($_SERVER as $name => $value) {
|
||||
if (substr($name, 0, 5) === 'HTTP_') {
|
||||
$headers[str_replace(' ', '-', strtolower(str_replace('_', ' ', substr($name, 5))))] = $value;
|
||||
$headers[strtolower(str_replace('_', '-', substr($name, 5)))] = $value;
|
||||
}
|
||||
}
|
||||
return $headers;
|
||||
|
||||
Reference in New Issue
Block a user