3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo var_export(20 / 3, true) . "\n"; echo var_export(6.66, true) . "\n"; echo var_export(6.0, true) . "\n"; echo "\n"; echo var_export(round(20 / 3, 14), true) . "\n"; echo var_export(round(6.66, 14), true) . "\n"; echo var_export(round(6.0, 14), true) . "\n"; echo "\n"; echo sprintf('%F', 20 / 3) . "\n"; echo sprintf('%F', 6.66) . "\n"; echo sprintf('%F', 6.0) . "\n"; echo "\n"; echo sprintf('%.14F', 20 / 3) . "\n"; echo sprintf('%.14F', 6.66) . "\n"; echo sprintf('%.14F', 6.0) . "\n"; echo "\n"; echo rtrim(sprintf('%.14F', 20 / 3), '0') . "\n"; echo rtrim(sprintf('%.14F', 6.66), '0') . "\n"; echo rtrim(sprintf('%.14F', 6.0), '0') . "\n";
Output for git.master, git.master_jit, rfc.property-hooks
6.666666666666667 6.66 6.0 6.66666666666667 6.66 6.0 6.666667 6.660000 6.000000 6.66666666666667 6.66000000000000 6.00000000000000 6.66666666666667 6.66 6.

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