3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $zero = 0.0; $even = 1.0; $fraction = 1.3; var_dump((float)$zero); var_dump(floatval($zero)); var_dump((float)$even); var_dump(floatval($even)); var_dump((float)$fraction); var_dump(floatval($fraction));
based on aL46R
Output for 5.3.22 - 7.3.0rc3
float(0) float(0) float(1) float(1) float(1.3) float(1.3)