Open
Description
Description
The following code:
<?php
if ( php_sapi_name() === 'cli' ) {
echo "filter_input does not work in PHP CLI";
exit;
}
var_dump( filter_input( INPUT_SERVER, 'REQUEST_TIME_FLOAT' ) );
var_dump( $_SERVER['REQUEST_TIME_FLOAT'] );
var_dump( filter_input( INPUT_SERVER, 'REQUEST_TIME' ) );
var_dump( $_SERVER['REQUEST_TIME'] );
Resulted in this output:
NULL
float(1737560728.0001)
NULL
int(1737560728)
But I expected this output instead:
float(1737560728.0001)
float(1737560728.0001)
int(1737560728)
int(1737560728)
These are the only 2 documented in https://www.php.net/manual/en/reserved.variables.server.php with that behavior? Is this a bug?
I only encountered this behavior with other (non-documented) variables HOME
and USER
PHP Version
PHP 8.4
Operating System
No response