3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // auszug aus dem ModelValidationService->validateAndCorrectSubtype $f = 59.44; $i = (int)$f; $d = (($f - $i) * pow(10, 4)); echo "Ist".PHP_EOL; var_dump($d); var_dump((int)$d); echo PHP_EOL."Soll".PHP_EOL; var_dump((string)$d); var_dump((int)(string)$d);
based on rCiaN
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.3.0beta1
Ist float(4400) int(4399) Soll string(4) "4400" int(4400)