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 number_format(20/3, ini_get('precision'), '.', '') . "\n"; echo number_format(20/3 * 1e6, ini_get('precision'), '.', '') . "\n"; echo number_format(6.66, ini_get('precision'), '.', '') . "\n"; echo number_format(6.0, ini_get('precision'), '.', '') . "\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 6666666.66666666697711 6.66000000000000 6.00000000000000
Output for 7.0.14 - 7.0.20
6666666.666666667 6.6600000000000001 6.0 6.66666666666667 6666666.66666666697711 6.66000000000000 6.00000000000000
Output for 7.0.2 - 7.0.10
6666666.66666666697710752 6.66000000000000014210855 6.0 6.66666666666667 6666666.66666666697711 6.66000000000000 6.00000000000000
Output for 5.4.22 - 5.4.45, 5.5.6 - 5.5.38, 5.6.0 - 5.6.25, 7.0.0 - 7.0.1
6666666.66666666697710752 6.66000000000000014210855 6 6.66666666666667 6666666.66666666697711 6.66000000000000 6.00000000000000
Output for 5.6.28
6666666.666666667 6.6600000000000001 6 6.66666666666667 6666666.66666666697711 6.66000000000000 6.00000000000000
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 6666666.66666666697711 6.66000000000000 6.00000000000000
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 6666666.66666666790843 6.66000000000000 6.00000000000000

preferences:
302.05 ms | 402 KiB | 354 Q