[HttpFoundation] improve perf of previous merge (refs #8882)
This commit is contained in:
parent
85eaec3eda
commit
729ac7b967
@ -888,8 +888,8 @@ class Request
|
||||
}
|
||||
|
||||
if ($host = $this->headers->get('HOST')) {
|
||||
if (preg_match('/:(\d+)$/', $host, $matches)) {
|
||||
return intval($matches[1]);
|
||||
if (false !== $pos = strrpos($host, ':')) {
|
||||
return intval(substr($host, $pos + 1));
|
||||
}
|
||||
|
||||
return 'https' === $this->getScheme() ? 443 : 80;
|
||||
|
Reference in New Issue
Block a user