I think the previous poster is new to web development, so to keep the confusion down I recommend that other newbies read a tutorial on the HTTP protocol.
The poster meant well, but server variables have absolutely nothing to do with this function (nor the HTTP protocol). They aren't a part of the received browser header. getallheaders() will return the entire BROWSER header string to an array.
That's all it is supposed to do and as it was pointed out (by smclean) that this is a VERY USEFUL feature for certain applications. That's why I looked up the function in the first place!
So, yes, you must use the $_SERVER array to retrieve server variables. And to understand certain variables passed by the server read up on the CGI protocol.