3v4l.org

run code in 300+ PHP versions simultaneously
<?php $number1 = round(354.2550, 2); $number2 = round(38456.12, 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.0070.01416.25
8.3.50.0110.00421.89
8.3.40.0070.00718.71
8.3.30.0070.00719.00
8.3.20.0070.00020.34
8.3.10.0080.00023.64
8.3.00.0030.00520.94
8.2.180.0120.00616.38
8.2.170.0070.00722.96
8.2.160.0100.01020.57
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00019.36
8.2.110.0040.00721.11
8.2.100.0040.00717.78
8.2.90.0050.00219.41
8.2.80.0000.00817.97
8.2.70.0060.00317.75
8.2.60.0030.00618.03
8.2.50.0030.00618.10
8.2.40.0060.00319.80
8.2.30.0000.00718.33
8.2.20.0080.00017.76
8.2.10.0070.00018.08
8.2.00.0040.00419.53
8.1.280.0070.00725.92
8.1.270.0060.00323.96
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0040.00422.17
8.1.230.0060.00619.23
8.1.220.0000.00917.74
8.1.210.0000.00818.77
8.1.200.0000.00917.25
8.1.190.0080.00017.22
8.1.180.0080.00018.10
8.1.170.0000.00818.64
8.1.160.0080.00022.04
8.1.150.0000.00818.57
8.1.140.0030.00517.38
8.1.130.0030.00317.84
8.1.120.0070.00317.50
8.1.110.0020.00517.44
8.1.100.0070.00017.44
8.1.90.0000.00717.45
8.1.80.0000.00717.47
8.1.70.0000.00717.39
8.1.60.0000.00917.47
8.1.50.0000.00817.41
8.1.40.0060.00317.48
8.1.30.0060.00317.58
8.1.20.0000.00717.56
8.1.10.0000.00717.61
8.1.00.0000.00817.41
8.0.300.0000.00818.77
8.0.290.0040.00416.58
8.0.280.0000.00718.58
8.0.270.0050.00317.34
8.0.260.0040.00417.40
8.0.250.0000.00816.91
8.0.240.0040.00417.10
8.0.230.0070.00016.93
8.0.220.0030.00316.90
8.0.210.0070.00016.90
8.0.200.0000.00716.95
8.0.190.0050.00316.93
8.0.180.0030.00616.93
8.0.170.0000.00716.77
8.0.160.0030.00416.84
8.0.150.0030.00316.81
8.0.140.0030.00516.77
8.0.130.0050.00013.40
8.0.120.0000.00716.88
8.0.110.0050.00316.79
8.0.100.0000.00716.90
8.0.90.0060.00316.86
8.0.80.0120.00316.97
8.0.70.0070.00016.74
8.0.60.0070.00016.98
8.0.50.0000.00716.72
8.0.30.0100.00916.87
8.0.20.0120.00817.40
8.0.10.0050.00317.06
8.0.00.0080.01016.86
7.4.330.0030.00315.08
7.4.320.0000.00616.67
7.4.300.0070.00016.66
7.4.290.0030.00316.47
7.4.280.0040.00416.46
7.4.270.0000.00716.67
7.4.260.0070.00016.52
7.4.250.0070.00016.51
7.4.240.0050.00216.49
7.4.230.0070.00016.69
7.4.220.0090.00616.64
7.4.210.0150.00016.48
7.4.200.0040.00416.59
7.4.160.0070.01416.38
7.4.150.0070.01017.40
7.4.140.0100.00717.86
7.4.130.0090.00816.57
7.4.120.0060.01016.65
7.4.110.0160.00016.62
7.4.100.0100.00616.32
7.4.90.0030.01416.39
7.4.80.0130.00719.39
7.4.70.0030.01416.63
7.4.60.0200.00316.75
7.4.50.0000.00516.50
7.4.40.0030.01416.32
7.4.30.0120.00616.56
7.4.00.0000.01415.13
7.3.330.0030.00312.98
7.3.320.0060.00013.10
7.3.310.0000.00816.15
7.3.300.0000.00716.09
7.3.290.0150.00616.29
7.3.280.0100.01016.21
7.3.270.0110.00717.40
7.3.260.0100.01316.33
7.3.250.0140.00616.36
7.3.240.0060.01216.53
7.3.230.0080.00816.52
7.3.210.0030.01316.27
7.3.200.0080.00819.39
7.3.190.0070.01216.12
7.3.180.0100.00516.47
7.3.170.0090.00616.27
7.3.160.0150.00516.34
7.3.120.0070.01014.64
7.2.330.0000.01616.53
7.2.320.0170.00016.53
7.2.310.0100.01016.75
7.2.300.0070.01416.71
7.2.290.0030.01316.52
7.2.00.0030.01019.41
7.1.100.0000.00918.14
7.1.70.0030.00517.11
7.1.60.0140.01019.70
7.1.50.0260.01034.50
7.1.00.0000.08022.28
7.0.200.0030.00616.79
7.0.140.0070.07022.21
7.0.60.0030.06719.86
7.0.50.0000.07717.85
7.0.40.0130.08020.24
7.0.30.0200.06720.00
7.0.20.0400.07020.09
7.0.10.0000.09720.16
7.0.00.0270.07020.19
5.6.280.0100.06720.81
5.6.210.0100.06720.69
5.6.200.0070.05718.11
5.6.190.0070.07720.35
5.6.180.4070.04720.58
5.6.170.0300.07320.59
5.6.160.0070.04320.50
5.6.150.0030.06718.14
5.6.140.0030.04718.21
5.6.130.0000.06018.08
5.6.120.0100.05020.91
5.6.110.0030.04021.02
5.6.100.0070.07721.02
5.6.90.0070.08720.98
5.6.80.0070.05020.41
5.6.70.4400.03320.43
5.5.350.0100.06320.39
5.5.340.0130.06317.88
5.5.330.0070.08020.57
5.5.320.0330.04320.18
5.5.310.0230.08320.37
5.5.300.0070.06317.95
5.5.290.0030.04017.93
5.5.280.0100.08020.87
5.5.270.0000.05020.79
5.5.260.0030.08320.86
5.5.250.0030.08020.69
5.5.240.0300.06020.06
5.4.450.0200.05319.81
5.4.440.0830.06019.48
5.4.430.0470.03719.54
5.4.420.0170.05019.10
5.4.410.0330.03318.97
5.4.400.1170.03719.00
5.4.390.0330.03719.05
5.4.380.0270.04318.64
5.4.370.0270.05318.61
5.4.360.0400.03718.72
5.4.350.0270.05018.60
5.4.340.0370.03718.52
5.4.320.0050.03812.46
5.4.310.0030.04512.45
5.4.300.0010.04312.46
5.4.290.0070.03512.45
5.4.280.0050.03512.36
5.4.270.0070.03512.35
5.4.260.0050.03912.35
5.4.250.0050.03812.35
5.4.240.0020.03912.35
5.4.230.0060.03712.35
5.4.220.0050.03812.35
5.4.210.0050.04012.35
5.4.200.0070.03712.34
5.4.190.0070.03512.34
5.4.180.0070.03612.34
5.4.170.0060.03812.36
5.4.160.0090.03512.35
5.4.150.0060.03712.34
5.4.140.0110.03312.03
5.4.130.0040.03812.02
5.4.120.0070.03611.97
5.4.110.0040.03611.97
5.4.100.0080.03911.97
5.4.90.0030.04011.97
5.4.80.0100.03311.97
5.4.70.0070.03411.97
5.4.60.0070.03311.97
5.4.50.0060.03511.97
5.4.40.0040.03611.96
5.4.30.0030.04111.95
5.4.20.0040.03611.95
5.4.10.0030.03811.96
5.4.00.0060.03511.44
5.3.290.0060.05212.80
5.3.280.0070.04412.71
5.3.270.0070.03812.72
5.3.260.0050.04012.72
5.3.250.0060.04412.72
5.3.240.0070.03612.72
5.3.230.0050.03812.71
5.3.220.0090.03412.68
5.3.210.0060.03912.68
5.3.200.0060.03612.68
5.3.190.0070.03712.68
5.3.180.0080.03612.67
5.3.170.0060.03712.67
5.3.160.0060.03612.68
5.3.150.0060.03712.67
5.3.140.0040.03912.66
5.3.130.0050.04712.66
5.3.120.0110.05012.66
5.3.110.0130.04912.66
5.3.100.0110.04312.12
5.3.90.0070.03812.09
5.3.80.0070.03512.07
5.3.70.0070.03512.08
5.3.60.0060.04112.06
5.3.50.0060.03612.00
5.3.40.0090.04712.00
5.3.30.0110.04511.95
5.3.20.0040.04311.73
5.3.10.0100.03111.69
5.3.00.0080.03411.68
5.2.170.0060.0349.20
5.2.160.0040.0359.19
5.2.150.0010.0339.20
5.2.140.0040.0309.19
5.2.130.0020.0319.15
5.2.120.0060.0269.15
5.2.110.0050.0289.16
5.2.100.0050.0289.16
5.2.90.0070.0269.16
5.2.80.0040.0309.15
5.2.70.0030.0319.16
5.2.60.0050.0299.10
5.2.50.0050.0309.07
5.2.40.0040.0299.05
5.2.30.0040.0319.03
5.2.20.0030.0309.02
5.2.10.0030.0298.98
5.2.00.0040.0298.84
5.1.60.0020.0268.12
5.1.50.0030.0268.12
5.1.40.0040.0308.10
5.1.30.0040.0278.45
5.1.20.0050.0328.46
5.1.10.0040.0268.20
5.1.00.0050.0258.19
5.0.50.0030.0226.67
5.0.40.0050.0186.53
5.0.30.0050.0346.34
5.0.20.0030.0206.32
5.0.10.0020.0216.30
5.0.00.0040.0316.29
4.4.90.0030.0164.77
4.4.80.0040.0154.75
4.4.70.0040.0154.75
4.4.60.0020.0174.75
4.4.50.0040.0154.77
4.4.40.0050.0234.71
4.4.30.0020.0174.76
4.4.20.0040.0154.85
4.4.10.0030.0154.85
4.4.00.0030.0264.76
4.3.110.0020.0174.67
4.3.100.0010.0174.66
4.3.90.0020.0164.64
4.3.80.0030.0254.60
4.3.70.0020.0164.63
4.3.60.0030.0154.63
4.3.50.0030.0164.63
4.3.40.0060.0234.54
4.3.30.0020.0233.36
4.3.20.0050.0193.32
4.3.10.0030.0213.29
4.3.00.0070.01714.98

preferences:
41.51 ms | 401 KiB | 5 Q