3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * @see https://community.developer.authorize.net/t5/The-Authorize-Net-Developer-Blog/Precision-Math-with-PHP/ba-p/8368 */ var_dump(floor((0.2 + 1.4) * 10)); // Should be 16. But it's 15! var_dump(floor(16)); // Using BC Math var_dump(bcadd('0.2', '1.4', 2) * 10); // It's 16 like we would expect it to be.

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0100.00316.75
8.3.50.0090.00917.92
8.3.40.0040.01118.71
8.3.30.0140.00718.47
8.3.20.0040.00420.38
8.3.10.0120.00323.78
8.3.00.0080.00019.25
8.2.180.0040.01116.32
8.2.170.0150.00022.96
8.2.160.0100.00620.27
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0060.00317.50
8.2.120.0000.00826.35
8.2.110.0030.00621.18
8.2.100.0060.00617.63
8.2.90.0080.00019.05
8.2.80.0090.00017.97
8.2.70.0040.00417.46
8.2.60.0040.00417.79
8.2.50.0000.00818.07
8.2.40.0020.00519.21
8.2.30.0070.00320.69
8.2.20.0080.00017.56
8.2.10.0040.00418.09
8.2.00.0000.00718.05
8.1.280.0110.01125.92
8.1.270.0000.00824.09
8.1.260.0070.00028.09
8.1.250.0000.00828.09
8.1.240.0080.00022.27
8.1.230.0110.00317.42
8.1.220.0000.00717.74
8.1.210.0060.00318.77
8.1.200.0040.00417.12
8.1.190.0030.00517.57
8.1.180.0030.00618.10
8.1.170.0030.00518.64
8.1.160.0000.00722.05
8.1.150.0070.00018.91
8.1.140.0060.00319.37
8.1.130.0070.00017.68
8.1.120.0000.00817.38
8.1.110.0080.00017.29
8.1.100.0000.00717.39
8.1.90.0040.00417.48
8.1.80.0050.00317.27
8.1.70.0030.00317.33
8.1.60.0050.00317.52
8.1.50.0090.00017.36
8.1.40.0060.00317.44
8.1.30.0000.00917.56
8.1.20.0070.00017.46
8.1.10.0070.00017.48
8.1.00.0050.00217.30
8.0.300.0040.00418.77
8.0.290.0070.00016.58
8.0.280.0070.00018.36
8.0.270.0070.00017.16
8.0.260.0000.00617.20
8.0.250.0000.00716.98
8.0.240.0030.00316.83
8.0.230.0040.00416.83
8.0.220.0050.00216.73
8.0.210.0000.00716.74
8.0.200.0040.00416.89
8.0.190.0000.00816.80
8.0.180.0000.00816.88
8.0.170.0030.00516.77
8.0.160.0030.00416.77
8.0.150.0050.00216.82
8.0.140.0040.00416.79
8.0.130.0050.00013.38
8.0.120.0050.00316.71
8.0.110.0040.00416.68
8.0.100.0040.00416.70
8.0.90.0070.00016.73
8.0.80.0090.00616.74
8.0.70.0000.00816.95
8.0.60.0000.00716.80
8.0.50.0050.00216.93
8.0.30.0120.00616.78
8.0.20.0130.01217.40
8.0.10.0000.00716.96
8.0.00.0100.01116.66
7.4.330.0020.00216.71
7.4.320.0040.00416.50
7.4.300.0000.00616.45
7.4.290.0060.00316.54
7.4.280.0000.00816.45
7.4.270.0070.00016.54
7.4.260.0070.00016.56
7.4.250.0000.00716.51
7.4.240.0040.00316.45
7.4.230.0030.00316.54
7.4.220.0120.01016.46
7.4.210.0090.00916.57
7.4.200.0040.00416.43
7.4.160.0150.00716.37
7.4.150.0180.00317.40
7.4.140.0160.00417.86
7.4.130.0080.00916.55
7.4.120.0060.01516.55
7.4.110.0030.01416.44
7.4.100.0100.00716.59
7.4.90.0110.00716.46
7.4.80.0130.01019.39
7.4.70.0110.00616.43
7.4.60.0130.00316.45
7.4.50.0110.00416.38
7.4.40.0100.00716.46
7.4.30.0080.00816.39
7.4.00.0040.01014.88
7.3.330.0050.00013.05
7.3.320.0050.00013.18
7.3.310.0070.00016.18
7.3.300.0000.00616.06
7.3.290.0080.01016.29
7.3.280.0060.01116.24
7.3.270.0030.01417.40
7.3.260.0130.00316.52
7.3.250.0100.00816.42
7.3.240.0120.00716.38
7.3.230.0030.01516.39
7.3.210.0030.01316.27
7.3.200.0000.02216.31
7.3.190.0150.00616.28
7.3.180.0120.00316.26
7.3.170.0090.00916.28
7.3.160.0060.00916.53
7.3.120.0030.01414.91
7.3.110.0030.01214.75
7.3.100.0040.00814.75
7.3.90.0150.00314.61
7.3.80.0090.00614.54
7.3.70.0000.01314.55
7.3.60.0030.01014.54
7.3.50.0000.01514.48
7.3.40.0050.00814.71
7.3.30.0080.00814.70
7.3.20.0090.00016.69
7.3.10.0050.00516.53
7.3.00.0000.01216.27
7.2.330.0080.00816.67
7.2.320.0090.00916.59
7.2.310.0060.00916.33
7.2.300.0090.00816.20
7.2.290.0100.00716.58
7.2.250.0040.01514.87
7.2.240.0070.01014.86
7.2.230.0120.00614.95
7.2.220.0070.01314.71
7.2.210.0090.00915.12
7.2.200.0060.00914.86
7.2.190.0140.00014.98
7.2.180.0030.00715.03
7.2.170.0100.00614.88
7.2.60.0070.00716.48
7.2.00.0000.01519.18
7.1.330.0070.00715.57
7.1.320.0040.00815.59
7.1.310.0120.00315.77
7.1.300.0060.00615.91
7.1.290.0060.00715.75
7.1.280.0090.00615.65
7.1.270.0000.01315.65
7.1.260.0070.00715.59
7.1.200.0040.01115.49
7.1.100.0040.01118.04
7.1.70.0000.00817.13
7.1.60.0030.02019.36
7.1.50.0120.00616.98
7.1.00.0070.07322.28
7.0.200.0030.00516.86
7.0.60.0030.04319.90
7.0.50.0130.07717.81
7.0.40.0000.09020.19
7.0.30.0230.06020.30
7.0.20.0400.06720.33
7.0.10.0100.07720.30
7.0.00.0200.07320.00
5.6.280.0100.07320.89
5.6.210.0030.04020.69
5.6.200.0070.07718.22
5.6.190.0030.07320.34
5.6.180.0500.07020.56
5.6.170.0330.06320.38
5.6.160.0000.04320.46
5.6.150.0130.07718.18
5.6.140.0000.04318.18
5.6.130.0000.04318.07
5.6.120.0130.07721.09
5.6.110.0070.08321.00
5.6.100.0130.06321.03
5.6.90.0030.07320.98
5.6.80.0030.05020.50
5.5.350.0270.07320.52
5.5.340.0130.06718.02
5.5.330.0170.07320.57
5.5.320.0070.08020.13
5.5.310.0200.04020.23
5.5.300.0000.04317.89
5.5.290.0100.04317.93
5.5.280.0100.06720.62
5.5.270.0070.08720.86
5.5.260.0070.06020.88
5.5.250.0130.07320.68
5.5.240.4330.03320.15

preferences:
60.15 ms | 401 KiB | 5 Q