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) * 3)); // Should be 16. But it's 15! // Using BC Math var_dump(bcadd('0.2', '1.4', 2) * 3); // 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.0180.00016.50
8.3.50.0100.00717.82
8.3.40.0100.00718.85
8.3.30.0120.00918.75
8.3.20.0040.00420.07
8.3.10.0070.00022.00
8.3.00.0090.00019.26
8.2.180.0150.00016.75
8.2.170.0120.00322.96
8.2.160.0030.01020.35
8.2.150.0030.00624.18
8.2.140.0100.00624.66
8.2.130.0080.00017.63
8.2.120.0070.00026.35
8.2.110.0060.00619.42
8.2.100.0110.00017.50
8.2.90.0050.00319.28
8.2.80.0040.00417.97
8.2.70.0030.00617.50
8.2.60.0110.00018.04
8.2.50.0040.00418.07
8.2.40.0070.00019.53
8.2.30.0000.00720.62
8.2.20.0030.00617.79
8.2.10.0030.00518.07
8.2.00.0000.00717.93
8.1.280.0070.01025.92
8.1.270.0040.00422.23
8.1.260.0040.00428.09
8.1.250.0000.00828.09
8.1.240.0060.00321.05
8.1.230.0080.00417.65
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0090.00017.35
8.1.190.0070.00017.57
8.1.180.0030.00518.10
8.1.170.0040.00418.45
8.1.160.0050.00222.05
8.1.150.0000.00718.84
8.1.140.0000.00919.51
8.1.130.0030.00317.58
8.1.120.0070.00017.32
8.1.110.0080.00017.30
8.1.100.0050.00317.41
8.1.90.0030.00317.45
8.1.80.0070.00017.40
8.1.70.0000.00717.34
8.1.60.0040.00417.52
8.1.50.0000.00817.48
8.1.40.0000.00717.48
8.1.30.0040.00417.50
8.1.20.0020.00517.52
8.1.10.0020.00517.56
8.1.00.0040.00417.48
8.0.300.0000.00718.77
8.0.290.0000.00716.63
8.0.280.0000.00718.36
8.0.270.0070.00017.14
8.0.260.0000.00717.28
8.0.250.0030.00316.96
8.0.240.0000.00616.98
8.0.230.0050.00316.92
8.0.220.0040.00416.83
8.0.210.0000.00716.88
8.0.200.0030.00316.84
8.0.190.0040.00416.75
8.0.180.0080.00016.75
8.0.170.0040.00416.80
8.0.160.0050.00316.84
8.0.150.0000.00716.89
8.0.140.0040.00416.76
8.0.130.0000.00513.36
8.0.120.0070.00016.84
8.0.110.0040.00416.71
8.0.100.0040.00416.89
8.0.90.0000.00716.84
8.0.80.0140.00016.83
8.0.70.0070.00016.82
8.0.60.0050.00316.90
8.0.50.0030.00316.69
8.0.30.0140.00517.04
8.0.20.0080.01117.40
8.0.10.0040.00416.95
8.0.00.0080.01116.63
7.4.330.0000.00516.72
7.4.320.0030.00316.43
7.4.300.0030.00316.55
7.4.290.0030.00316.56
7.4.280.0070.00316.43
7.4.270.0020.00516.44
7.4.260.0070.00016.43
7.4.250.0000.00716.52
7.4.240.0050.00216.51
7.4.230.0060.00016.37
7.4.220.0120.00616.39
7.4.210.0060.00916.56
7.4.200.0000.00716.61
7.4.160.0120.00616.52
7.4.150.0060.01217.40
7.4.140.0100.00817.86
7.4.130.0100.00916.52
7.4.120.0100.00816.53
7.4.110.0110.00716.62
7.4.100.0110.01116.41
7.4.90.0090.00816.42
7.4.80.0060.01219.39
7.4.70.0090.00616.44
7.4.60.0090.00616.50
7.4.50.0030.00916.63
7.4.40.0140.00316.63
7.4.30.0060.01116.48
7.4.00.0080.00814.55
7.3.330.0030.00313.30
7.3.320.0050.00013.08
7.3.310.0030.00316.32
7.3.300.0070.00016.26
7.3.290.0060.00816.25
7.3.280.0120.00516.26
7.3.270.0140.00317.40
7.3.260.0160.00016.25
7.3.250.0100.00616.27
7.3.240.0090.01016.36
7.3.230.0160.01016.39
7.3.210.0030.01816.43
7.3.200.0060.01016.30
7.3.190.0140.00316.37
7.3.180.0080.01216.11
7.3.170.0060.01116.50
7.3.160.0130.00316.41
7.3.10.0130.00016.22
7.3.00.0090.00316.22
7.2.330.0130.00716.66
7.2.320.0090.00816.32
7.2.310.0160.00616.55
7.2.300.0100.00716.38
7.2.290.0100.00716.64
7.2.130.0030.00916.50
7.2.120.0080.00416.50
7.2.110.0070.00716.50
7.2.100.0070.00716.50
7.2.90.0090.00016.52
7.2.80.0120.00916.62
7.2.70.0040.01116.60
7.2.60.0060.00916.42
7.2.50.0030.00616.73
7.2.40.0060.00616.36
7.2.30.0060.01016.59
7.2.20.0000.01316.44
7.2.10.0050.00516.56
7.2.00.0050.00617.82
7.1.250.0060.00615.90
7.1.200.0080.00415.58
7.1.100.0060.00317.93
7.1.70.0060.00916.84
7.1.60.0140.01019.36
7.1.50.0090.01516.96
7.1.00.0000.07722.41
7.0.200.0000.00816.72
7.0.60.0130.03319.81
7.0.50.0000.04317.79
7.0.40.0070.04320.03
7.0.30.0200.05720.21
7.0.20.0370.05020.18
7.0.10.0030.04720.16
7.0.00.0130.07720.19
5.6.280.0000.06020.77
5.6.210.0030.04320.71
5.6.200.0030.06318.21
5.6.190.0030.04320.57
5.6.180.0300.06020.43
5.6.170.0230.03720.38
5.6.160.0070.07020.48
5.6.150.0070.05018.12
5.6.140.0100.08018.21
5.6.130.0070.07318.17
5.6.120.0130.07321.01
5.6.110.0100.08721.00
5.6.100.0000.04721.12
5.6.90.0130.05720.99
5.6.80.0000.08020.41
5.5.350.0170.08020.32
5.5.340.0030.04017.95
5.5.330.0100.08020.57
5.5.320.0000.05320.32
5.5.310.0370.07320.16
5.5.300.0070.06718.01
5.5.290.0070.05018.02
5.5.280.0100.06720.86
5.5.270.0130.07320.75
5.5.260.0070.07320.95
5.5.250.0030.04320.65
5.5.240.0230.07320.36

preferences:
39.05 ms | 401 KiB | 5 Q