I am having a problem parsing http headers with PHP.
When I run this code:
$headers = getallheaders();
all headers are loaded into the $headers array. However, if any array key name has a "-" in it, then the corresponding result is null. For example:
echo $headers[User-Agent];
will return null, whereas:
echo $headers[Host];
will return the value normally.
Is this a bug or I am missing something?