3v4l.org

run code in 300+ PHP versions simultaneously
<?php $number1 = round(354.2550, 2); $number2 = round(38456.1000, 2); //echo strlen(substr(strrchr($number1, "."), 1)) . "<br />"; //echo strlen(substr(strrchr($number2, "."), 1)); echo number_format($number1, strlen(substr(strrchr($number1, "."), 1)), ',', '.'); echo PHP_EOL; echo number_format($number2, strlen(substr(strrchr($number2, "."), 1)), ',', '.');

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.0110.01116.50
8.3.50.0090.00622.05
8.3.40.0120.00618.87
8.3.30.0100.00319.05
8.3.20.0070.00020.41
8.3.10.0080.00023.39
8.3.00.0080.00020.96
8.2.180.0040.01116.38
8.2.170.0080.00622.96
8.2.160.0040.01420.35
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00419.36
8.2.110.0030.00620.38
8.2.100.0080.00417.72
8.2.90.0040.00418.16
8.2.80.0040.00417.97
8.2.70.0040.00417.75
8.2.60.0060.00618.05
8.2.50.0000.00918.07
8.2.40.0040.00418.22
8.2.30.0000.00718.38
8.2.20.0000.00817.78
8.2.10.0030.00517.96
8.2.00.0040.00419.49
8.1.280.0070.01425.92
8.1.270.0060.00324.01
8.1.260.0070.00026.35
8.1.250.0020.00528.09
8.1.240.0000.00822.22
8.1.230.0070.00421.00
8.1.220.0040.00417.79
8.1.210.0060.00318.97
8.1.200.0030.00617.13
8.1.190.0040.00417.25
8.1.180.0040.00418.10
8.1.170.0050.00318.51
8.1.160.0060.00322.02
8.1.150.0040.00418.71
8.1.140.0000.00717.40
8.1.130.0000.00717.79
8.1.120.0060.00317.46
8.1.110.0000.00817.48
8.1.100.0040.00417.46
8.1.90.0040.00417.38
8.1.80.0040.00417.36
8.1.70.0030.00317.42
8.1.60.0040.00417.58
8.1.50.0030.00617.51
8.1.40.0000.00817.45
8.1.30.0000.00817.58
8.1.20.0040.00417.66
8.1.10.0050.00217.50
8.1.00.0030.00517.37
8.0.300.0080.00020.24
8.0.290.0000.00816.75
8.0.280.0000.00718.50
8.0.270.0000.00717.29
8.0.260.0030.00317.33
8.0.250.0030.00317.09
8.0.240.0030.00717.01
8.0.230.0000.00716.88
8.0.220.0000.00716.89
8.0.210.0000.00816.93
8.0.200.0060.00317.00
8.0.190.0030.00516.86
8.0.180.0000.01016.91
8.0.170.0020.00516.95
8.0.160.0070.00016.86
8.0.150.0000.00816.86
8.0.140.0000.00716.91
8.0.130.0000.00513.35
8.0.120.0070.00016.88
8.0.110.0000.00816.89
8.0.100.0080.00016.85
8.0.90.0000.00816.92
8.0.80.0070.01416.95
8.0.70.0040.00416.78
8.0.60.0050.00216.75
8.0.50.0030.00616.78
8.0.30.0100.00917.16
8.0.20.0120.00617.40
8.0.10.0000.00817.01
8.0.00.0050.01216.97
7.4.330.0050.00015.20
7.4.320.0000.00616.61
7.4.300.0060.00016.51
7.4.290.0070.00016.62
7.4.280.0050.00516.66
7.4.270.0050.00216.52
7.4.260.0070.00016.61
7.4.250.0000.00716.38
7.4.240.0050.00216.60
7.4.230.0070.00016.39
7.4.220.0110.00816.58
7.4.210.0090.00616.57
7.4.200.0000.00716.65
7.4.160.0060.00916.49
7.4.150.0090.00917.40
7.4.140.0120.00517.86
7.4.130.0140.00716.52
7.4.120.0090.00816.45
7.4.110.0130.00316.58
7.4.100.0100.00616.46
7.4.90.0210.00416.66
7.4.80.0120.01319.39
7.4.70.0100.00616.40
7.4.60.0060.00916.60
7.4.50.0020.00216.45
7.4.40.0110.00616.36
7.4.30.0150.00616.39
7.4.00.0000.01614.87
7.3.330.0000.00613.13
7.3.320.0060.00013.08
7.3.310.0000.00716.22
7.3.300.0000.00716.07
7.3.290.0130.00616.20
7.3.280.0090.00816.22
7.3.270.0130.00317.40
7.3.260.0100.01316.14
7.3.250.0040.01816.30
7.3.240.0060.01116.11
7.3.230.0090.01216.39
7.3.210.0150.00316.41
7.3.200.0080.00819.39
7.3.190.0140.00316.31
7.3.180.0120.00316.49
7.3.170.0070.00716.45
7.3.160.0080.00816.50
7.3.120.0100.00714.76
7.2.330.0080.01116.75
7.2.320.0080.00816.68
7.2.310.0090.00616.41
7.2.300.0130.00316.76
7.2.290.0030.01316.71
7.2.60.0090.00616.73
7.2.00.0030.00918.96
7.1.200.0060.00315.50
7.1.100.0050.00518.00
7.1.70.0070.00317.07
7.1.60.0070.01819.70
7.1.50.0070.01516.79
7.1.00.0030.07722.48
7.0.200.0000.00716.63
7.0.140.0030.07721.97
7.0.60.0130.07719.92
7.0.50.0100.07717.90
7.0.40.0330.04019.98
7.0.30.0200.05020.12
7.0.20.0170.04720.18
7.0.10.0130.06320.17
7.0.00.0000.04720.19
5.6.280.0030.07320.92
5.6.210.0170.07020.52
5.6.200.0070.07018.22
5.6.190.0100.08020.77
5.6.180.3530.05020.61
5.6.170.0100.04720.38
5.6.160.0030.07720.52
5.6.150.0100.07318.22
5.6.140.0100.06318.18
5.6.130.0000.05718.18
5.6.120.0130.07721.09
5.6.110.0070.06021.01
5.6.100.0070.06721.13
5.6.90.0130.07721.12
5.6.80.0070.08020.40
5.6.70.3670.04320.32
5.5.350.0070.06720.46
5.5.340.0100.04318.00
5.5.330.0100.08020.17
5.5.320.0270.08320.26
5.5.310.0230.08720.30
5.5.300.0100.08017.98
5.5.290.0100.08018.07
5.5.280.0070.08020.98
5.5.270.0100.08020.97
5.5.260.0100.08020.76
5.5.250.0100.07020.66
5.5.240.0100.03720.28
5.4.450.0500.04719.48
5.4.440.0400.04319.11
5.4.430.0530.06319.55
5.4.420.0600.06019.11
5.4.410.0370.04019.51
5.4.400.0400.04019.23
5.4.390.0400.05718.92
5.4.380.0500.06719.08
5.4.370.0500.06718.88
5.4.360.0530.05718.88
5.4.350.0530.06319.09
5.4.340.0400.05719.23
5.4.320.0470.06718.88
5.4.310.0370.04018.92
5.4.300.0430.05319.13
5.4.290.0530.03719.19
5.4.280.0530.06019.19
5.4.270.0570.06318.80
5.4.260.0500.06318.89
5.4.250.0470.06018.78
5.4.240.0500.05319.19
5.4.230.0370.04719.07
5.4.220.0500.06319.30
5.4.210.0500.06719.13
5.4.200.0430.04318.89
5.4.190.0370.04018.87
5.4.180.0470.07019.09
5.4.170.0470.03718.78
5.4.160.0470.06719.14
5.4.150.0330.04719.20
5.4.140.0500.06316.26
5.4.130.0570.05316.45
5.4.120.0500.06316.24
5.4.110.0530.06016.22
5.4.100.0500.06716.50
5.4.90.0400.04716.43
5.4.80.0370.04716.44
5.4.70.0500.06016.19
5.4.60.0570.06016.22
5.4.50.0470.06316.41
5.4.40.0500.06716.10
5.4.30.0530.06316.46
5.4.20.0470.06716.28
5.4.10.0500.06716.44
5.4.00.0530.06015.77
5.3.290.0500.09014.71
5.3.280.0530.06714.50
5.3.270.0430.03314.69
5.3.260.0400.04014.45
5.3.250.0470.05314.52
5.3.240.0500.04014.48
5.3.230.0430.03714.55
5.3.220.0370.04014.65
5.3.210.0370.04014.61
5.3.200.0370.04314.59
5.3.190.0470.07014.55
5.3.180.0470.04714.59
5.3.170.0530.05714.46
5.3.160.0530.04314.65
5.3.150.0500.06714.50
5.3.140.0400.04714.43
5.3.130.0530.04014.48
5.3.120.0530.05014.60
5.3.110.0400.04314.46
5.3.100.0400.04713.98
5.3.90.0430.04713.93
5.3.80.0330.05013.97
5.3.70.0370.04013.95
5.3.60.0400.03713.91
5.3.50.0370.04013.82
5.3.40.0570.06013.88
5.3.30.0500.06313.93
5.3.20.0500.06313.64
5.3.10.0500.06313.43
5.3.00.0370.03713.54
5.2.170.0300.03012.07
5.2.160.0330.02712.07
5.2.150.0430.05712.07
5.2.140.0330.04012.07
5.2.130.0430.04712.07
5.2.120.0400.05312.07
5.2.110.0370.03012.07
5.2.100.0330.02712.07
5.2.90.0370.03012.07
5.2.80.0330.03712.07
5.2.70.0430.04012.07
5.2.60.0370.02712.07
5.2.50.0430.03712.07
5.2.40.0370.05012.07
5.2.30.0300.03712.07
5.2.20.0470.02712.07
5.2.10.0300.03312.07
5.2.00.0330.05012.07
5.1.60.0270.03312.07
5.1.50.0330.04712.07
5.1.40.0400.04012.07
5.1.30.0430.02712.07
5.1.20.0470.03312.07
5.1.10.0370.04012.07
5.1.00.0470.03312.07
5.0.50.0230.02712.07
5.0.40.0230.03012.07
5.0.30.0200.06012.07
5.0.20.0200.03712.07
5.0.10.0200.03712.07
5.0.00.0200.05312.07
4.4.90.0130.02012.07
4.4.80.0130.01312.07
4.4.70.0130.03312.07
4.4.60.0230.02312.07
4.4.50.0200.01712.07
4.4.40.0170.04012.07
4.4.30.0200.02712.07
4.4.20.0200.02712.07
4.4.10.0230.00712.07
4.4.00.0100.02712.07
4.3.110.0230.02312.07
4.3.100.0200.01312.07
4.3.90.0170.03712.07
4.3.80.0170.05312.07
4.3.70.0230.02712.07
4.3.60.0130.02312.07
4.3.50.0270.02012.07
4.3.40.0130.02312.07
4.3.30.0100.02012.07
4.3.20.0200.01312.07
4.3.10.0100.02712.07
4.3.00.0070.03012.07

preferences:
48.4 ms | 401 KiB | 5 Q