3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $payment_amount = 9475.8; var_dump($payment_amount); var_dump($payment_amount * 100); var_dump(sprintf("%010d", (int) ($payment_amount * 100))); print sprintf("%10d", 947580);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
float(9475.8) float(947580) string(10) "0000947579" 947580