3v4l.org

run code in 300+ PHP versions simultaneously
<?php $formatter = NumberFormatter::create("en-US", NumberFormatter::DEFAULT_STYLE, null); $formatter->setAttribute(NumberFormatter::FRACTION_DIGITS, 2); print $formatter->format(60.65); print "\n"; print $formatter->format(0 + "60.65"); print "\n"; $formatter->setAttribute(NumberFormatter::FRACTION_DIGITS, 0); $formatter->setAttribute(NumberFormatter::ROUNDING_MODE, NumberFormatter::ROUND_HALFUP); print $formatter->format(60.65); print "\n"; print $formatter->format("60.65"); print "\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.70.0170.00320.00
8.3.60.0120.00620.56
8.3.50.0090.00823.06
8.3.40.0150.00020.34
8.3.30.0060.00920.64
8.3.20.0030.00621.66
8.3.10.0080.00021.65
8.3.00.0000.00821.00
8.2.180.0000.01820.29
8.2.170.0040.01122.96
8.2.160.0100.00721.77
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0060.00326.16
8.2.120.0060.00323.64
8.2.110.0100.00023.42
8.2.100.0060.00619.41
8.2.90.0030.00519.25
8.2.80.0030.00620.16
8.2.70.0050.00519.67
8.2.60.0080.00019.68
8.2.50.0030.00619.38
8.2.40.0030.00622.02
8.2.30.0030.00621.14
8.2.20.0000.00819.47
8.2.10.0000.00719.74
8.2.00.0050.00319.45
8.1.280.0120.00325.92
8.1.270.0090.00025.29
8.1.260.0050.00326.35
8.1.250.0030.00628.09
8.1.240.0000.01023.73
8.1.230.0080.00820.75
8.1.220.0030.00619.27
8.1.210.0030.00519.11
8.1.200.0070.00318.74
8.1.190.0060.00318.97
8.1.180.0040.00418.85
8.1.170.0030.00620.42
8.1.160.0040.00423.25
8.1.150.0040.00420.07
8.1.140.0000.00719.23
8.1.130.0030.00319.56
8.1.120.0000.00719.43
8.1.110.0030.00619.38
8.1.100.0070.00019.38
8.1.90.0000.00719.03
8.1.80.0050.00319.01
8.1.70.0000.00719.39
8.1.60.0000.00819.18
8.1.50.0080.00019.41
8.1.40.0040.00419.02
8.1.30.0030.00619.45
8.1.20.0030.00619.68
8.1.10.0000.00819.51
8.1.00.0000.00819.41
8.0.300.0050.00221.59
8.0.290.0040.00418.50
8.0.280.0070.00019.70
8.0.270.0040.00419.00
8.0.260.0000.00718.89
8.0.250.0070.00018.90
8.0.240.0030.00318.79
8.0.230.0000.00718.66
8.0.220.0030.00318.58
8.0.210.0000.00718.61
8.0.200.0040.00418.67
8.0.190.0090.00018.70
8.0.180.0000.00718.62
8.0.170.0030.00618.66
8.0.160.0000.00718.59
8.0.150.0040.00418.48
8.0.140.0040.00418.49
8.0.130.0030.00313.30
8.0.120.0040.00418.73
8.0.110.0000.00818.90
8.0.100.0040.00418.96
8.0.90.0040.00418.82
8.0.80.0130.00718.94
8.0.70.0040.00418.32
8.0.60.0040.00418.89
8.0.50.0080.00018.70
8.0.30.0110.00819.05
8.0.20.0090.01018.90
8.0.10.0070.00019.05
8.0.00.0110.01218.60
7.4.330.0000.00615.00
7.4.320.0030.00318.43
7.4.300.0030.00318.41
7.4.290.0070.00018.58
7.4.280.0050.00318.57
7.4.270.0070.00018.58
7.4.260.0050.00218.42
7.4.250.0000.00818.34
7.4.240.0040.00318.50
7.4.230.0080.00018.50
7.4.220.0100.01018.38
7.4.210.0120.00418.45
7.4.200.0060.00318.52
7.4.160.0060.00918.34
7.4.150.0160.00318.40
7.4.140.0120.01018.12
7.4.130.0120.01018.40
7.4.120.0100.00718.28
7.4.110.0110.01218.39
7.4.100.0100.01318.31
7.4.90.0150.00918.31
7.4.80.0040.01419.37
7.4.70.0100.00718.32
7.4.60.0090.00918.48
7.4.50.0000.00818.65
7.4.40.0060.01318.28
7.4.30.0100.00718.29
7.4.00.0080.00916.81
7.3.330.0000.00613.00
7.3.320.0030.00613.16
7.3.310.0060.00317.97
7.3.300.0030.00317.85
7.3.290.0060.00918.17
7.3.280.0150.00418.08
7.3.270.0090.00918.38
7.3.260.0140.01118.11
7.3.250.0100.00718.26
7.3.240.0070.01118.07
7.3.230.0080.01118.10
7.3.210.0100.00718.09
7.3.200.0040.01919.39
7.3.190.0060.01218.57
7.3.180.0070.01018.32
7.3.170.0080.01218.17
7.3.160.0040.01618.36
7.3.120.0060.01316.59
7.3.110.0100.00316.76
7.3.100.0030.01016.73
7.3.90.0100.00316.67
7.3.80.0060.00616.55
7.3.70.0030.00616.83
7.3.60.0060.00316.49
7.3.50.0070.00716.79
7.3.40.0000.01116.75
7.3.30.0090.00616.71
7.3.20.0070.01018.18
7.3.10.0080.00418.06
7.3.00.0060.00518.21
7.2.330.0090.00917.97
7.2.320.0080.00818.47
7.2.310.0110.00718.51
7.2.300.0040.01318.63
7.2.290.0110.00618.30
7.2.250.0040.01216.56
7.2.240.0070.01316.54
7.2.230.0090.00916.55
7.2.220.0040.01116.66
7.2.210.0080.00816.38
7.2.200.0030.01316.31
7.2.190.0000.01716.84
7.2.180.0100.00716.77
7.2.170.0040.00816.54
7.2.130.0030.00618.29
7.2.120.0030.01018.46
7.2.110.0040.01218.42
7.2.100.0060.00618.45
7.2.90.0070.00718.40
7.2.80.0030.01018.82
7.2.70.0000.01118.71
7.2.60.0070.00718.10
7.2.50.0060.00618.63
7.2.40.0040.00718.45
7.2.30.0000.01018.67
7.2.20.0070.00718.28
7.2.10.0030.00718.63
7.2.00.0040.00720.12
7.1.330.0040.01117.48
7.1.320.0030.01017.35
7.1.310.0000.01417.22
7.1.300.0060.00617.43
7.1.290.0040.00417.18
7.1.280.0140.00017.60
7.1.270.0060.00917.27
7.1.260.0110.00317.22
7.1.250.0030.00717.38
7.1.100.0040.01119.38
7.1.70.0030.00818.98
7.1.60.0110.00519.25
7.1.50.0030.02018.88
7.1.00.0100.07324.50
7.0.200.0030.00818.86
7.0.140.0000.07724.13
7.0.100.0200.08321.85
7.0.90.0130.07721.81
7.0.80.0130.08321.78
7.0.70.0330.04321.72
7.0.60.0070.08321.82
7.0.50.0430.07022.20
7.0.40.0070.08021.77
7.0.30.0130.08021.95
7.0.20.0100.06721.66
7.0.10.0100.04721.79
7.0.00.0100.06021.86
5.6.280.0000.08022.96
5.6.250.0170.06722.56
5.6.240.0070.04722.34
5.6.230.0130.08322.50
5.6.220.0100.06022.46
5.6.210.0030.08722.47
5.6.200.0070.08322.61
5.6.190.0070.08722.68
5.6.180.0230.03022.87
5.6.170.0030.07322.84
5.6.160.0100.06022.89
5.6.150.0030.09022.87
5.6.140.0130.08322.91
5.6.130.0070.07722.89
5.6.120.0230.07022.86
5.6.110.0130.05022.91
5.6.100.0070.05722.59
5.6.90.0100.04723.02
5.6.80.0130.07322.28
5.6.70.0100.07322.25
5.6.60.0100.06322.09
5.6.50.0130.07322.30
5.6.40.0170.04722.07
5.6.30.0170.06722.20
5.6.20.0070.05722.19
5.6.10.0070.06722.02
5.6.00.0170.07021.97
5.5.380.0070.04322.14
5.5.370.0130.07722.22
5.5.360.0070.06722.20
5.5.350.0030.08022.25
5.5.340.0070.08722.55
5.5.330.0100.07722.58
5.5.320.0100.08322.76
5.5.310.0100.08722.55
5.5.300.0070.07022.32
5.5.290.0070.08022.68
5.5.280.0030.06322.57
5.5.270.0130.04022.73
5.5.260.0030.07022.79
5.5.250.0070.07322.55
5.5.240.0070.06021.82
5.5.230.0030.09322.20
5.5.220.0070.05022.05
5.5.210.0100.07722.12
5.5.200.0100.07721.93
5.5.190.0000.07722.11
5.5.180.0070.06021.90
5.5.160.0030.08721.66
5.5.150.0100.07322.06
5.5.140.0130.06021.78
5.5.130.0170.03721.83
5.5.120.0230.05321.69
5.5.110.0130.05722.10
5.5.100.0100.07721.65
5.5.90.0170.07021.85
5.5.80.0130.06722.05
5.5.70.0070.07722.01
5.5.60.0070.07722.04
5.5.50.0130.05021.63
5.5.40.0070.07322.04
5.5.30.0130.07721.83
5.5.20.0100.04021.67
5.5.10.0030.08021.83
5.5.00.0130.05321.95
5.4.450.0200.07721.09
5.4.440.0170.05321.02
5.4.430.0030.08720.91
5.4.420.0070.06021.06
5.4.410.0070.06320.79
5.4.400.0130.03020.66
5.4.390.0070.07720.36
5.4.380.0130.06320.76
5.4.370.0100.06320.73
5.4.360.0070.05020.79
5.4.350.0000.08720.79
5.4.340.0100.08020.74
5.4.320.0030.04320.73
5.4.310.0030.08020.56
5.4.300.0100.06720.79
5.4.290.0070.07720.78
5.4.280.0130.07320.77
5.4.270.0100.07020.57
5.4.260.0030.06720.56
5.4.250.0030.04720.73
5.4.240.0100.07720.73
5.4.230.0170.08020.78
5.4.220.0000.07720.72
5.4.210.0100.07020.74
5.4.200.0030.08020.52
5.4.190.0170.07020.79
5.4.180.0070.04020.73
5.4.170.0200.05720.55
5.4.160.0330.05720.73
5.4.150.0130.07320.75
5.4.140.0030.08018.00
5.4.130.0100.06318.01
5.4.120.0130.06318.11
5.4.110.0100.06318.09
5.4.100.0130.07018.14
5.4.90.0170.06317.92
5.4.80.0070.07717.87
5.4.70.0130.06018.04
5.4.60.0030.07717.89
5.4.50.0030.04317.89
5.4.40.0170.04318.07
5.4.30.0100.06718.04
5.4.20.0100.05318.02
5.4.10.0070.03717.96
5.4.00.0100.06017.45
5.3.290.0100.06014.64
5.3.280.0070.04014.54
5.3.270.0100.06014.56
5.3.260.0130.07314.46
5.3.250.0100.07314.46
5.3.240.0100.06014.56
5.3.230.0130.06314.45
5.3.220.0100.07714.43
5.3.210.0070.07714.39
5.3.200.0030.07014.53
5.3.190.0070.07014.57
5.3.180.0130.05314.57
5.3.170.0130.05014.59
5.3.160.0000.06714.51
5.3.150.0100.07314.55
5.3.140.0030.08014.38
5.3.130.0070.08314.48
5.3.120.0030.07714.54
5.3.110.0070.04014.37
5.3.100.0030.07713.94
5.3.90.0070.07714.02
5.3.80.0000.04314.00
5.3.70.0100.06313.98
5.3.60.0100.05313.95
5.3.50.0070.07713.85
5.3.40.0070.04713.94
5.3.30.0030.05013.88
5.3.20.0000.04713.46
5.3.10.0070.05713.65
5.3.00.0130.04313.50
5.2.170.0070.04311.16
5.2.160.0030.05311.10
5.2.150.0030.06311.00
5.2.140.0030.06011.13
5.2.130.0130.05711.09
5.2.120.0130.05311.12
5.2.110.0030.06311.15
5.2.100.0070.05710.98
5.2.90.0070.05710.92
5.2.80.0070.07011.16
5.2.70.0130.05310.95
5.2.60.0070.05311.00
5.2.50.0100.05311.09
5.2.40.0000.06311.01
5.2.30.0000.06310.97
5.2.20.0030.04710.92
5.2.10.0030.06010.78
5.2.00.0070.05710.73
5.1.60.0000.0379.99
5.1.50.0030.0379.98
5.1.40.0070.0409.97
5.1.30.0070.05010.31
5.1.20.0000.06310.39
5.1.10.0070.03310.08
5.1.00.0030.04010.07
5.0.50.0030.0408.80
5.0.40.0030.0438.80
5.0.30.0030.0638.80
5.0.20.0030.0438.80
5.0.10.0030.0408.80
5.0.00.0000.0578.80
4.4.90.0030.0338.80
4.4.80.0030.0378.80
4.4.70.0000.0208.80
4.4.60.0000.0378.80
4.4.50.0100.0278.80
4.4.40.0000.0478.80
4.4.30.0000.0308.80
4.4.20.0030.0308.80
4.4.10.0070.0208.80
4.4.00.0000.0408.80
4.3.110.0070.0208.80
4.3.100.0030.0308.80
4.3.90.0030.0238.80
4.3.80.0000.0478.80
4.3.70.0000.0378.80
4.3.60.0070.0238.80
4.3.50.0000.0238.80
4.3.40.0000.0338.80
4.3.30.0000.0278.80
4.3.20.0000.0408.80
4.3.10.0030.0208.80
4.3.00.0030.0338.80

preferences:
71.08 ms | 401 KiB | 5 Q