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"; function format($f) { return rtrim(rtrim(number_format($f, ini_get('precision'), '.', ''), '0'), '.'); } echo format(20/3) . "\n"; echo format(200000000 / 3) . "\n"; echo format(6.66) . "\n"; echo format(6.0) . "\n"; echo format(60.0) . "\n";
Output for 7.1.0 - 7.1.20, 7.2.6 - 7.2.33, 7.3.12 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
6666666.666666667 6.66 6.0 6.66666666666667 66666666.66666666418314 6.66 6 60
Output for 7.0.14 - 7.0.20
6666666.666666667 6.6600000000000001 6.0 6.66666666666667 66666666.66666666418314 6.66 6 60
Output for 7.0.2 - 7.0.8
6666666.66666666697710752 6.66000000000000014210855 6.0 6.66666666666667 66666666.66666666418314 6.66 6 60
Output for 5.4.22 - 5.4.45, 5.5.6 - 5.5.37, 5.6.0 - 5.6.23, 7.0.0 - 7.0.1
6666666.66666666697710752 6.66000000000000014210855 6 6.66666666666667 66666666.66666666418314 6.66 6 60
Output for 5.6.28
6666666.666666667 6.6600000000000001 6 6.66666666666667 66666666.66666666418314 6.66 6 60
Output for 4.3.0 - 4.3.4, 5.3.0 - 5.3.29, 5.4.0 - 5.4.21, 5.5.0 - 5.5.5
6666666.6666667 6.66 6 6.66666666666667 66666666.66666666418314 6.66 6 60
Output for 4.3.5 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
6666666.6666667 6.66 6 6.66666666666667 66666666.66666665673256 6.66 6 60

preferences:
248.25 ms | 402 KiB | 352 Q