I'm fairly new to PHP and in the process of updating a system from PHP5 to PHP7.
$HTTP_RAW_POST_DATA
is deprecated in PHP7 and I had read that file_get_contents("php://input")
was it's equivocal replacement.
I have tested them against each other using PHP5 and found that they produce different data as follows:
$data = file_get_contents("php://input");
echo $data;
$data = $GLOBALS["HTTP_RAW_POST_DATA"];
echo $data;
with output:
pid=395,
,
In the first case the data contains the form content, in the second it doesn't. This variable being identified as empty was how the query was parsed for different purposes.
Have I missed something?