3v4l.org

run code in 300+ PHP versions simultaneously
<?php ini_set('precision', 20); for ($num = 74.30; $num < 74.41; $num += .01) { var_export(sprintf("$num => %.02f", ceil($num * 20) / 20)); // see '74.35 => £74.40' echo "\n"; } echo "---\n"; var_export(sprintf("74.35 => %.02f", ceil(74.35 * 20) / 20)); // see '74.35 => £74.35'
Output for git.master, git.master_jit, rfc.property-hooks
'74.299999999999997158 => 74.30' '74.310000000000002274 => 74.35' '74.32000000000000739 => 74.35' '74.330000000000012506 => 74.35' '74.340000000000017621 => 74.35' '74.350000000000022737 => 74.40' '74.360000000000027853 => 74.40' '74.370000000000032969 => 74.40' '74.380000000000038085 => 74.40' '74.390000000000043201 => 74.40' '74.400000000000048317 => 74.45' --- '74.35 => 74.35'

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:
32.6 ms | 406 KiB | 5 Q