3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "This is the problem, im expecting 1012". PHP_EOL; echo intval((floatval("10.12") * 100)) . PHP_EOL; //1011 echo "Just Floatval". PHP_EOL; echo (floatval("10.12") * 100) . PHP_EOL; //1012 echo "Convert to string (other number)". PHP_EOL; echo intval((floatval("11.12") * 100)) . PHP_EOL; //1112 echo "Convert to string (other number)". PHP_EOL; echo intval((floatval("10.13") * 100)) . PHP_EOL; //1013 echo "Use bcmul instead". PHP_EOL; echo bcmul("10.12", 100) . PHP_EOL; //1012
Output for git.master_jit, git.master, rfc.property-hooks
This is the problem, im expecting 1012 1011 Just Floatval 1012 Convert to string (other number) 1112 Convert to string (other number) 1013 Use bcmul instead 1012

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
33.38 ms | 405 KiB | 5 Q