Jakub
2024-04-09 10:55:21 UTC
Welcome
I have this script
<?php
$a = $_SERVER;
foreach ( $a as $k => $v) {
echo $k . ' => ' . $v . '<br>';
}
echo '<hr><br>';
$b = filter_input_array(INPUT_SERVER);
foreach ( $b as $k => $v) {
echo $k . ' => ' . $v . '<br>';
}
The result is almost the same.
But $_SERVER give to access to this keys:
REQUEST_TIME_FLOAT and REQUEST_TIME
but filter_input_array(INPUT_SERVER)
don't have these keys.
How to fix this problem?
I have this script
<?php
$a = $_SERVER;
foreach ( $a as $k => $v) {
echo $k . ' => ' . $v . '<br>';
}
echo '<hr><br>';
$b = filter_input_array(INPUT_SERVER);
foreach ( $b as $k => $v) {
echo $k . ' => ' . $v . '<br>';
}
The result is almost the same.
But $_SERVER give to access to this keys:
REQUEST_TIME_FLOAT and REQUEST_TIME
but filter_input_array(INPUT_SERVER)
don't have these keys.
How to fix this problem?