3v4l.org

run code in 300+ PHP versions simultaneously
<?php $clientTotal = 0.00000; $vendorTotal = 1234; $profitMarginPercent = round((($clientTotal - $vendorTotal + PHP_FLOAT_EPSILON)/$vendorTotal) * 100, 2); $profitMarginPercent = ($profitMarginPercent > 0.0 ? "+" : "") . $profitMarginPercent; echo $profitMarginPercent . PHP_EOL; $clientTotal = 89.64110; $vendorTotal = 89.64110; $profitMarginPercent = round((($clientTotal - $vendorTotal + PHP_FLOAT_EPSILON)/$vendorTotal) * 100, 2); $profitMarginPercent = ($profitMarginPercent > 0.0 ? "+" : "") . $profitMarginPercent; echo $profitMarginPercent . PHP_EOL; $clientTotal = 89.64110; $vendorTotal = 75.34; $profitMarginPercent = round((($clientTotal - $vendorTotal + PHP_FLOAT_EPSILON)/$vendorTotal) * 100, 2); $profitMarginPercent = ($profitMarginPercent > 0.0 ? "+" : "") . $profitMarginPercent; echo $profitMarginPercent . PHP_EOL;

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.4.140.0110.00917.67
8.4.130.0030.00719.24
8.4.120.0120.00422.13
8.4.110.0130.00819.81
8.4.100.0050.00417.60
8.4.90.0110.00622.33
8.4.80.0110.00418.70
8.4.70.0050.00318.85
8.4.60.0150.00820.45
8.4.50.0070.00220.29
8.4.40.0130.00618.49
8.4.30.0130.00718.93
8.4.20.0140.00619.63
8.4.10.0090.00019.39
8.3.270.0130.01018.79
8.3.260.0040.00516.85
8.3.250.0100.01017.28
8.3.240.0060.00416.79
8.3.230.0140.00516.64
8.3.220.0060.00219.07
8.3.210.0030.00616.66
8.3.200.0050.00416.74
8.3.190.0120.00717.28
8.3.180.0100.00817.29
8.3.170.0140.00419.11
8.3.160.0040.01417.18
8.3.150.0170.00317.39
8.3.140.0060.00316.89
8.3.130.0030.00618.62
8.3.120.0080.00819.07
8.3.110.0030.00616.86
8.3.100.0130.00624.06
8.3.90.0040.00426.77
8.3.80.0030.00617.97
8.3.70.0140.00716.88
8.3.60.0100.00718.52
8.3.50.0170.00016.93
8.3.40.0250.01719.83
8.3.30.0270.00819.21
8.3.20.0100.01323.49
8.3.10.0150.00623.80
8.3.00.0180.01218.85
8.2.290.0120.00716.64
8.2.280.0140.00618.63
8.2.270.0160.00317.07
8.2.260.0090.00917.35
8.2.250.0000.00818.54
8.2.240.0060.00317.34
8.2.230.0040.00420.94
8.2.220.0040.00437.54
8.2.210.0050.00326.77
8.2.200.0000.00918.66
8.2.190.0150.00018.38
8.2.180.0150.00018.66
8.2.170.0380.00619.05
8.2.160.0370.00320.43
8.2.150.0250.00319.30
8.2.140.0100.01322.39
8.2.130.0170.00322.46
8.2.120.0120.01221.10
8.2.110.0180.00321.11
8.2.100.0160.00619.47
8.2.90.0230.01318.85
8.2.80.0200.00319.16
8.2.70.0250.00718.64
8.2.60.0210.01419.10
8.2.50.0160.00319.30
8.2.40.0270.00018.86
8.2.30.0240.00318.78
8.2.20.0180.00918.96
8.2.10.0220.00018.90
8.2.00.0240.01018.82
8.1.330.0110.00816.24
8.1.320.0100.00317.95
8.1.310.0050.00318.64
8.1.300.0130.00616.23
8.1.290.0040.00730.84
8.1.280.0100.01025.92
8.1.270.0130.00324.16
8.1.260.0140.00723.65
8.1.250.0060.01624.00
8.1.240.0360.00318.59
8.1.230.0180.00918.57
8.1.220.0100.01318.98
8.1.210.0210.00718.55
8.1.200.0190.00618.78
8.1.190.0180.00618.53
8.1.180.0280.00618.39
8.1.170.0180.01118.83
8.1.160.0170.01318.72
8.1.150.0140.01018.97
8.1.140.0180.00918.87
8.1.130.0210.00418.70
8.1.120.0180.00718.58
8.1.110.0160.00818.71
8.1.100.0130.00619.83
8.1.90.0230.00018.79
8.1.80.0200.00920.03
8.1.70.0280.00019.05
8.1.60.0200.01318.79
8.1.50.0180.01418.88
8.1.40.0200.00718.93
8.1.30.0140.01019.23
8.1.20.0160.00920.09
8.1.10.0220.00418.58
8.1.00.0190.00618.60

preferences:
29.55 ms | 403 KiB | 5 Q