3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 1111111.505; $round = round($a, 2); echo "round: " . $round . "\n"; $sprintf = sprintf('%01.2F', $a); echo "sprintf: " . $sprintf . "\n"; echo bcmul($round, 100). "\n"; echo "round * 100: " . $round . "\n"; echo bcmul($sprintf, 100). "\n"; echo "sprintf * 100: " . $sprintf . "\n";
Output for git.master, git.master_jit, rfc.property-hooks
round: 1111111.51 sprintf: 1111111.50 111111151 round * 100: 1111111.51 111111150 sprintf * 100: 1111111.50

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:
49.49 ms | 401 KiB | 8 Q