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