Something is wrong with eval
function
$string = '$val = 1526.65 - 1519.99;';
eval($string);
echo $val; => give 6.6600000000001, expected 6.66
The test is here : http://sandbox.onlinephpfunctions.com/code/fa5b2e7e6602e60cdeb054b705a69e4a226bd52c
Anyone have an explanation ?