3v4l.org

run code in 300+ PHP versions simultaneously
<?php $number1 = round(354.2550, 2); $number2 = round(38456.1246, 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.0100.01016.63
8.3.50.0120.00521.92
8.3.40.0110.00418.49
8.3.30.0080.00618.96
8.3.20.0050.00320.32
8.3.10.0050.00223.71
8.3.00.0080.00021.02
8.2.180.0040.01116.75
8.2.170.0100.00722.96
8.2.160.0110.00420.52
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0060.00319.36
8.2.110.0110.01122.33
8.2.100.0040.00718.28
8.2.90.0000.00819.18
8.2.80.0030.00617.97
8.2.70.0060.00317.75
8.2.60.0040.00817.93
8.2.50.0060.00318.07
8.2.40.0030.00620.07
8.2.30.0000.00818.33
8.2.20.0040.00417.73
8.2.10.0040.00418.14
8.2.00.0080.00019.45
8.1.280.0170.00325.92
8.1.270.0060.00323.79
8.1.260.0050.00226.35
8.1.250.0070.00028.09
8.1.240.0060.00322.14
8.1.230.0070.00419.21
8.1.220.0000.00817.79
8.1.210.0080.00018.77
8.1.200.0000.00817.35
8.1.190.0030.00617.13
8.1.180.0000.00918.10
8.1.170.0000.00918.65
8.1.160.0030.00622.04
8.1.150.0000.00718.70
8.1.140.0070.00017.46
8.1.130.0000.00717.93
8.1.120.0040.00717.39
8.1.110.0000.00717.36
8.1.100.0000.00817.53
8.1.90.0000.00717.40
8.1.80.0040.00417.50
8.1.70.0030.00317.42
8.1.60.0000.00817.46
8.1.50.0000.00717.55
8.1.40.0050.00317.54
8.1.30.0060.00317.70
8.1.20.0000.00717.63
8.1.10.0050.00217.60
8.1.00.0060.00317.57
8.0.300.0060.00318.77
8.0.290.0000.00716.63
8.0.280.0070.00018.53
8.0.270.0000.00717.41
8.0.260.0030.00317.34
8.0.250.0000.00717.02
8.0.240.0040.00417.03
8.0.230.0000.00716.90
8.0.220.0000.00716.94
8.0.210.0030.00316.76
8.0.200.0040.00416.95
8.0.190.0080.00016.98
8.0.180.0080.00416.85
8.0.170.0040.00416.93
8.0.160.0000.00716.97
8.0.150.0000.00716.89
8.0.140.0040.00416.76
8.0.130.0060.00013.36
8.0.120.0030.00516.85
8.0.110.0040.00416.89
8.0.100.0070.00016.74
8.0.90.0040.00416.84
8.0.80.0060.01016.97
8.0.70.0040.00416.80
8.0.60.0030.00416.74
8.0.50.0040.00416.94
8.0.30.0070.01217.05
8.0.20.0090.01117.40
8.0.10.0000.00716.82
8.0.00.0080.01016.75
7.4.330.0060.00015.00
7.4.320.0060.00016.61
7.4.300.0070.00016.61
7.4.290.0030.00316.61
7.4.280.0040.00416.60
7.4.270.0040.00416.62
7.4.260.0000.00716.54
7.4.250.0030.00516.63
7.4.240.0010.00616.55
7.4.230.0030.00316.64
7.4.220.0100.00716.42
7.4.210.0140.00316.56
7.4.200.0040.00416.60
7.4.160.0130.00316.53
7.4.150.0070.01617.40
7.4.140.0080.00917.86
7.4.130.0100.01016.52
7.4.120.0110.00616.52
7.4.110.0100.00716.56
7.4.100.0090.00916.71
7.4.90.0070.00916.52
7.4.80.0120.00919.39
7.4.70.0130.00416.52
7.4.60.0060.01016.64
7.4.50.0000.00516.50
7.4.40.0100.00616.63
7.4.30.0030.01316.54
7.4.00.0080.00514.97
7.3.330.0030.00313.13
7.3.320.0020.00213.01
7.3.310.0030.00616.18
7.3.300.0060.00016.20
7.3.290.0070.00716.24
7.3.280.0110.00816.24
7.3.270.0100.00717.40
7.3.260.0070.01016.27
7.3.250.0130.00816.30
7.3.240.0060.00916.50
7.3.230.0060.01016.54
7.3.210.0110.01116.36
7.3.200.0030.01319.39
7.3.190.0150.00416.42
7.3.180.0090.00816.30
7.3.170.0060.00916.27
7.3.160.0090.00916.49
7.3.120.0080.00414.63
7.3.10.0040.01116.66
7.3.00.0050.00516.55
7.2.330.0130.00316.65
7.2.320.0100.00616.81
7.2.310.0060.00916.70
7.2.300.0080.00816.78
7.2.290.0060.01016.44
7.2.130.0060.00916.66
7.2.120.0040.01216.87
7.2.110.0060.00916.94
7.2.100.0000.01516.85
7.2.90.0030.00916.98
7.2.80.0080.00416.88
7.2.70.0090.00316.90
7.2.60.0060.00616.91
7.2.50.0100.00316.94
7.2.40.0000.01117.10
7.2.30.0090.00616.93
7.2.20.0160.00017.04
7.2.10.0030.00716.78
7.2.00.0050.00718.05
7.1.250.0030.01015.64
7.1.100.0060.00317.79
7.1.70.0080.00017.06
7.1.60.0070.01819.70
7.1.50.0000.01516.96
7.1.00.0070.07322.44
7.0.200.0070.00016.55
7.0.140.0000.07021.95
7.0.60.0070.07719.92
7.0.50.0030.04017.77
7.0.40.0130.08020.40
7.0.30.0470.04020.18
7.0.20.0370.07720.01
7.0.10.0030.07320.30
7.0.00.0030.05720.00
5.6.280.0030.07321.02
5.6.210.0070.06320.47
5.6.200.0100.07718.18
5.6.190.0070.09020.65
5.6.180.0300.07720.61
5.6.170.0270.07320.50
5.6.160.0170.07720.58
5.6.150.0070.06018.15
5.6.140.0070.08318.08
5.6.130.0030.04018.12
5.6.120.0100.04721.15
5.6.110.0100.07020.97
5.6.100.0000.04320.88
5.6.90.0200.07020.96
5.6.80.0170.05720.36
5.6.70.4370.04020.38
5.5.350.0000.03720.39
5.5.340.0000.04718.02
5.5.330.0130.04320.43
5.5.320.0200.06320.18
5.5.310.0200.04720.33
5.5.300.0030.04317.89
5.5.290.0070.03717.96
5.5.280.0170.08020.73
5.5.270.0000.06720.95
5.5.260.0130.07020.72
5.5.250.0070.08320.46
5.5.240.0030.03720.26
5.4.450.0370.04319.48
5.4.440.0200.04019.24
5.4.430.0200.04319.18
5.4.420.0470.04319.40
5.4.410.0230.04719.02
5.4.400.0170.04018.89
5.4.390.0400.03719.13
5.4.380.0230.05718.59
5.4.370.0370.05018.60
5.4.360.0230.04718.76
5.4.350.0270.04718.46
5.4.340.0070.06318.57
5.4.320.0080.05112.46
5.4.310.0080.04712.45
5.4.300.0080.04912.46
5.4.290.0050.04612.46
5.4.280.0060.03612.36
5.4.270.0060.03812.35
5.4.260.0050.03812.35
5.4.250.0080.04312.35
5.4.240.0030.04012.36
5.4.230.0090.03512.35
5.4.220.0070.03512.35
5.4.210.0070.03412.34
5.4.200.0070.03712.35
5.4.190.0030.03912.34
5.4.180.0070.03512.34
5.4.170.0070.03512.35
5.4.160.0110.03212.35
5.4.150.0080.03712.35
5.4.140.0030.04012.03
5.4.130.0070.03412.02
5.4.120.0060.03411.98
5.4.110.0050.03511.97
5.4.100.0050.03411.97
5.4.90.0050.03611.97
5.4.80.0040.03811.97
5.4.70.0040.03711.97
5.4.60.0070.03411.96
5.4.50.0060.04311.97
5.4.40.0060.03511.96
5.4.30.0040.04811.96
5.4.20.0030.04011.95
5.4.10.0080.03411.95
5.4.00.0050.03911.45
5.3.290.0070.04812.80
5.3.280.0030.04012.71
5.3.270.0050.04012.72
5.3.260.0090.03712.72
5.3.250.0060.03812.72
5.3.240.0060.03612.71
5.3.230.0070.03612.70
5.3.220.0040.04012.68
5.3.210.0080.03612.68
5.3.200.0050.03812.68
5.3.190.0080.03512.67
5.3.180.0040.03912.67
5.3.170.0030.04012.67
5.3.160.0050.03712.68
5.3.150.0050.03712.67
5.3.140.0030.03912.66
5.3.130.0060.03812.66
5.3.120.0070.03812.66
5.3.110.0030.04212.66
5.3.100.0090.03312.12
5.3.90.0030.03912.08
5.3.80.0060.03812.08
5.3.70.0060.03512.07
5.3.60.0050.03612.06
5.3.50.0030.03912.00
5.3.40.0070.03512.00
5.3.30.0060.03611.95
5.3.20.0060.03511.73
5.3.10.0030.03811.70
5.3.00.0060.03611.68
5.2.170.0080.0289.20
5.2.160.0050.0339.20
5.2.150.0030.0329.20
5.2.140.0030.0329.20
5.2.130.0060.0289.16
5.2.120.0060.0279.15
5.2.110.0060.0279.16
5.2.100.0020.0319.15
5.2.90.0040.0299.16
5.2.80.0060.0289.15
5.2.70.0070.0279.15
5.2.60.0040.0319.11
5.2.50.0060.0309.07
5.2.40.0050.0409.05
5.2.30.0030.0369.03
5.2.20.0030.0309.02
5.2.10.0020.0308.97
5.2.00.0040.0298.83
5.1.60.0060.0218.12
5.1.50.0060.0228.11
5.1.40.0020.0278.09
5.1.30.0050.0268.45
5.1.20.0040.0278.46
5.1.10.0030.0278.19
5.1.00.0070.0238.20
5.0.50.0040.0206.67
5.0.40.0030.0206.52
5.0.30.0030.0326.34
5.0.20.0060.0186.32
5.0.10.0060.0186.30
5.0.00.0060.0296.29
4.4.90.0030.0164.78
4.4.80.0040.0144.75
4.4.70.0020.0164.76
4.4.60.0010.0174.76
4.4.50.0010.0174.77
4.4.40.0010.0284.71
4.4.30.0010.0174.76
4.4.20.0040.0144.84
4.4.10.0050.0134.85
4.4.00.0030.0244.76
4.3.110.0000.0184.67
4.3.100.0040.0144.66
4.3.90.0020.0154.64
4.3.80.0020.0254.60
4.3.70.0020.0154.63
4.3.60.0040.0134.63
4.3.50.0030.0154.62
4.3.40.0020.0264.55
4.3.30.0010.0183.36
4.3.20.0000.0183.33
4.3.10.0030.0153.29
4.3.00.0070.01714.96

preferences:
40.83 ms | 401 KiB | 5 Q