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

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
194.62 ms | 2638 KiB | 10 Q