Well, you got the correct results. Using the var_dump() function is different depending on your version of PHP.
It is clear from your results that you are using the latest PHP 7.0… Therefore, you got the correct results.
If you want to just print the value of the variable instead of dumping the internal value of the variable, just use echo $x;
Normally, when you display a floating number, you use formatting to display it in the format you wish it to show in.
Here is the PHP manual’s version of the formatting functions. See the examples below where people posted. http://php.net/manual/en/function.number-format.php