3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo var_export(20 / 3 * 1e6, true) . "\n"; echo var_export(6.66, true) . "\n"; echo var_export(6.0, true) . "\n"; echo "\n"; echo var_export(round(20 / 3 * 1e6, 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 * 1e6) . "\n"; echo sprintf('%F', 6.66) . "\n"; echo sprintf('%F', 6.0) . "\n"; echo "\n"; echo sprintf('%.14F', 20 / 3 * 1e6) . "\n"; echo sprintf('%.14F', 6.66) . "\n"; echo sprintf('%.14F', 6.0) . "\n"; echo "\n"; echo rtrim(sprintf('%14.14F', 20 / 3 * 1e6), '0.') . "\n"; echo rtrim(sprintf('%14.14F', 6.66), '0.') . "\n"; echo rtrim(sprintf('%14.14F', 6.0), '0.') . "\n";
Output for git.master, git.master_jit, rfc.property-hooks
6666666.666666667 6.66 6.0 6666666.666666667 6.66 6.0 6666666.666667 6.660000 6.000000 6666666.66666666697711 6.66000000000000 6.00000000000000 6666666.66666666697711 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:
63.89 ms | 405 KiB | 9 Q