Is the order of the keys-value pairs in the $_GET superglobal variable guaranteed to be consistent with how the field-value pairs were received in the requested URL?
For example, given this URL request received by the web server:
index.php?a=1&foo=bar&b=2
...and this code:
foreach ($_GET as $key => $value)
{
echo $key . ": " . $value\n";
}
...will the result always be guaranteed to be:
a: 1
foo: bar
b: 2
I didn't see any mention of key ordering in the PHP doc of $_GET or superglobals in general. This leads me to believe that the order of the key-value pairs cannot be relied upon.
Does anyone know if the order has a guaranteed consistency to it, or better yet point to spec/doc that clarifies this?