I got weird results when I try to use filter_input
with INPUT_SERVER
(I am using PHP 5.6.9).
I run this code:
var_dump($_SERVER);
foreach (array_keys($_SERVER) as $varkey) {
var_dump($varkey, filter_input(INPUT_SERVER, $varkey));
}
I get that every filter_input(INPUT_SERVER, $varkey)
returns null. But $_SERVER
have correct values.
Why that's happening?
This is a known PHP bug. Try this:
This my wrapper until they fix this situation. Until then it must deal with it.