60e90d2657b4fc7c12cca364e063c707d412c41b
[mdref/mdref-http] / http / Env / negotiateEncoding.md
1 # static string http\Env::negotiateEncoding(array $supported[, array &$result)
2
3 Negotiate the client's preferred encoding.
4
5 > ***NOTE:***
6 > The first elemement of $supported encodings serves as a default if no encoding matches.
7
8 ## Params:
9
10 * array $supported
11 List of supported content encodings.
12 * Optional reference array &$result
13 Out parameter recording negotiation results.
14
15 ## Returns:
16
17 * NULL, if negotiation fails.
18 * string, the negotiated encoding.