3v4l.org

run code in 300+ PHP versions simultaneously
<?php $total = 38.500000; $newTotal = number_format($total,2); echo "NumberFormat: " . $newTotal . "\n"; echo "Float: " . sprintf("%.2f", $total) . "\n"; echo "Double: " .sprintf("%.2g", $total) . "\n";

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.40.0090.00618.79
8.3.30.0070.00719.17
8.3.20.0000.00820.14
8.3.10.0060.00322.13
8.3.00.0040.00422.31
8.2.170.0180.00322.96
8.2.160.0070.00720.43
8.2.150.0030.00524.18
8.2.140.0030.00524.66
8.2.130.0070.00026.16
8.2.120.0050.00319.45
8.2.110.0090.00021.12
8.2.100.0060.00717.91
8.2.90.0000.00818.22
8.2.80.0030.00517.97
8.2.70.0080.00017.93
8.2.60.0000.00818.03
8.2.50.0040.00418.10
8.2.40.0000.00820.73
8.2.30.0070.00017.99
8.2.20.0000.00817.58
8.2.10.0040.00419.60
8.2.00.0050.00217.86
8.1.270.0040.00421.96
8.1.260.0000.00926.35
8.1.250.0040.00428.09
8.1.240.0110.00020.80
8.1.230.0000.01121.03
8.1.220.0000.00817.78
8.1.210.0030.00519.02
8.1.200.0040.00417.13
8.1.190.0000.00917.22
8.1.180.0060.00618.10
8.1.170.0000.00918.62
8.1.160.0000.00722.02
8.1.150.0000.00718.68
8.1.140.0030.00617.41
8.1.130.0040.00417.93
8.1.120.0040.00417.52
8.1.110.0040.00417.44
8.1.100.0030.00517.41
8.1.90.0050.00217.59
8.1.80.0030.00417.52
8.1.70.0040.00417.38
8.1.60.0070.00717.55
8.1.50.0050.00317.54
8.1.40.0070.00017.62
8.1.30.0050.00217.61
8.1.20.0030.00517.65
8.1.10.0070.00017.48
8.1.00.0000.00817.39
8.0.300.0040.00419.90
8.0.290.0040.00416.75
8.0.280.0070.00018.50
8.0.270.0000.00717.30
8.0.260.0030.00316.84
8.0.250.0070.00017.03
8.0.240.0030.00616.98
8.0.230.0030.00517.01
8.0.220.0000.00716.96
8.0.210.0000.00716.95
8.0.200.0030.00317.01
8.0.190.0020.00516.89
8.0.180.0000.00716.92
8.0.170.0000.00716.94
8.0.160.0000.00716.80
8.0.150.0070.00016.95
8.0.140.0030.00516.94
8.0.130.0000.00613.42
8.0.120.0000.00716.87
8.0.110.0030.00516.90
8.0.100.0000.00716.98
8.0.90.0070.00016.77
8.0.80.0110.00416.92
8.0.70.0000.00716.96
8.0.60.0050.00316.82
8.0.50.0000.00716.84
8.0.30.0020.01617.12
8.0.20.0150.00517.43
8.0.10.0040.00417.07
8.0.00.0120.00816.76
7.4.330.0050.00015.08
7.4.320.0000.00616.48
7.4.300.0050.00216.47
7.4.290.0000.00716.64
7.4.280.0060.00016.61
7.4.270.0030.00316.45
7.4.260.0000.00716.50
7.4.250.0040.00416.54
7.4.240.0050.00216.54
7.4.230.0000.00716.59
7.4.220.0100.00716.61
7.4.210.0080.00816.55
7.4.200.0030.00316.47
7.4.190.0070.00016.73
7.4.160.0110.00416.50
7.4.150.0100.00717.40
7.4.140.0100.00817.86
7.4.130.0050.01216.54
7.4.120.0120.00716.49
7.4.110.0110.00716.36
7.4.100.0140.00916.52
7.4.90.0080.01216.44
7.4.80.0110.01219.39
7.4.70.0090.01216.44
7.4.60.0120.00416.49
7.4.50.0090.00016.55
7.4.40.0030.00922.77
7.4.30.0120.00316.43
7.4.00.0030.01014.71
7.3.330.0030.00313.19
7.3.320.0000.00513.13
7.3.310.0050.00216.31
7.3.300.0070.00016.42
7.3.290.0080.00616.32
7.3.280.0110.00916.38
7.3.270.0140.00417.40
7.3.260.0150.00416.40
7.3.250.0120.00516.41
7.3.240.0120.00416.27
7.3.230.0070.01016.49
7.3.210.0110.00516.61
7.3.200.0070.01019.39
7.3.190.0110.01116.48
7.3.180.0060.00916.47
7.3.170.0090.00816.37
7.3.160.0060.01016.47
7.3.120.0100.00614.66
7.2.330.0090.00816.93
7.2.320.0090.00916.73
7.2.310.0080.00816.66
7.2.300.0140.01216.93
7.2.290.0140.00316.75
7.2.60.0100.00316.95
7.2.00.0070.00719.40
7.1.200.0090.00315.56
7.1.100.0000.00817.80
7.1.70.0000.01117.00
7.1.60.0140.01119.82
7.1.50.0190.00416.85
7.1.00.0030.07722.43
7.0.200.0060.00616.78
7.0.140.0070.06722.00
7.0.60.0030.06019.82
7.0.50.0130.07317.84
7.0.40.0130.08020.12
7.0.30.0230.08720.04
7.0.20.0170.08720.07
7.0.10.0070.06320.30
7.0.00.0030.08020.13
5.6.280.0070.07020.85
5.6.210.0130.04320.50
5.6.200.0070.08318.22
5.6.190.0130.08720.66
5.6.180.0300.03720.67
5.6.170.0300.07720.56
5.6.160.0030.06020.50
5.6.150.0030.04718.19
5.6.140.0070.06018.18
5.6.130.0070.07718.08
5.6.120.0100.03721.01
5.6.110.0100.08320.98
5.6.100.0130.08720.95
5.6.90.0070.06320.95
5.6.80.0000.08320.36
5.5.350.3470.05020.33
5.5.340.0070.08017.96
5.5.330.0030.06020.15
5.5.320.0200.04320.38
5.5.310.0270.06720.19
5.5.300.0200.07018.02
5.5.290.0070.06717.91
5.5.280.0100.07020.67
5.5.270.0070.03720.86
5.5.260.0170.07720.86
5.5.250.0000.08720.56
5.5.240.0100.07320.18
5.4.450.1130.06019.28
5.4.440.0500.05019.13
5.4.430.0730.06719.54
5.4.420.0770.05319.54
5.4.410.0330.05319.02
5.4.400.0770.06319.19
5.4.390.0630.06319.11
5.4.380.0300.05318.77
5.4.370.0270.05718.78
5.4.360.0200.05318.62
5.4.350.0230.06018.50
5.4.340.0270.07318.68
5.4.320.0060.04012.45
5.4.310.0070.04012.45
5.4.300.0060.03912.45
5.4.290.0030.04112.45
5.4.280.0060.04012.35
5.4.270.0070.05318.77
5.4.260.0100.06718.94
5.4.250.0170.07318.79
5.4.240.0030.05718.93
5.4.230.0130.05318.93
5.4.220.0070.06319.02
5.4.210.0100.05018.89
5.4.200.0130.05018.79
5.4.190.0100.07318.79
5.4.180.0100.05719.02
5.4.170.0130.05318.70
5.4.160.0130.05318.77
5.4.150.0100.05018.75
5.4.140.0070.06016.35
5.4.130.0070.07016.30
5.4.120.0100.05716.46
5.4.110.0070.05316.45
5.4.100.0130.04716.41
5.4.90.0130.05016.48
5.4.80.0100.06316.48
5.4.70.0130.04316.43
5.4.60.0200.06316.39
5.4.50.0200.04316.38
5.4.40.0130.06716.32
5.4.30.0030.07716.38
5.4.20.0030.05316.45
5.4.10.0130.05316.29
5.4.00.0100.07015.84
5.3.290.0070.04612.80
5.3.280.0100.06714.47
5.3.270.0100.05314.67
5.3.260.0070.05714.68
5.3.250.0030.06014.76
5.3.240.0130.04714.46
5.3.230.0130.04714.68
5.3.220.0130.07014.64
5.3.210.0070.06314.34
5.3.200.0170.06314.71
5.3.190.0130.05314.62
5.3.180.0030.07714.62
5.3.170.0030.05714.71
5.3.160.0070.06314.62
5.3.150.0200.06314.61
5.3.140.0130.05014.46
5.3.130.0030.05714.32
5.3.120.0100.05314.31
5.3.110.0130.07014.64
5.3.100.0170.04314.10
5.3.90.0130.06013.91
5.3.80.0100.06713.91
5.3.70.0000.05314.17
5.3.60.0100.06313.95
5.3.50.0100.06013.64
5.3.40.0170.06013.96
5.3.30.0070.07713.90
5.3.20.0100.04713.54
5.3.10.0130.05713.42
5.3.00.0100.05013.65
5.2.170.0070.04711.36
5.2.160.0000.04311.25
5.2.150.0030.06311.04
5.2.140.0130.04311.13
5.2.130.0100.03711.11
5.2.120.0030.04311.00
5.2.110.0000.04711.20
5.2.100.0070.05011.20
5.2.90.0000.04310.98
5.2.80.0070.04011.23
5.2.70.0200.04011.19
5.2.60.0070.04011.25
5.2.50.0100.03710.91
5.2.40.0130.04711.19
5.2.30.0100.04010.88
5.2.20.0130.03311.07
5.2.10.0100.03311.04
5.2.00.0070.04710.60
5.1.60.0100.0309.88
5.1.50.0070.0339.98
5.1.40.0070.04010.23
5.1.30.0070.03310.23
5.1.20.0070.05010.55
5.1.10.0030.04010.32
5.1.00.0100.03710.06
5.0.50.0130.0238.53
5.0.40.0070.0238.53
5.0.30.0070.0478.54
5.0.20.0000.0378.34
5.0.10.0100.0338.21
5.0.00.0000.0538.13
4.4.90.0030.0335.96
4.4.80.0030.0235.95
4.4.70.0000.0305.94
4.4.60.0070.0205.88
4.4.50.0030.0205.96
4.4.40.0030.0435.95
4.4.30.0070.0275.96
4.4.20.0030.0305.95
4.4.10.0030.0236.01
4.4.00.0100.0305.95
4.3.110.0070.0235.89
4.3.100.0070.0235.79
4.3.90.0100.0175.82
4.3.80.0070.0305.77
4.3.70.0100.0175.81
4.3.60.0030.0305.81
4.3.50.0000.0275.83
4.3.40.0000.0335.70
4.3.30.0130.0235.32
4.3.20.0070.0205.32
4.3.10.0030.0235.32
4.3.00.0000.02313.50

preferences:
50.04 ms | 400 KiB | 5 Q