3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (!function_exists('nice_number')) { function nice_number($n) { // first strip any formatting; $n = (0 + str_replace(",", "", $n)); // is this a number? if (!is_numeric($n)) return false; // now filter it; $str = ''; if ($n > 1000000000000) { $str = round(($n / 1000000000000), 0) . ' tn '; $str .= nice_number($n % 1000000000000); return $str; } else if ($n > 1000000000) { $str = round(($n / 1000000000), 0) . ' bn '; $str .= nice_number($n % 1000000000); return $str; } else if ($n > 1000000) { $str = round(($n / 1000000), 0) . ' mn '; $str .= nice_number($n % 1000000); return $str; } else if ($n > 1000) return round(($n / 1000),0) . ' K '; return number_format($n); } } echo nice_number(20000);

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.0080.01118.30
8.3.50.0120.00722.09
8.3.40.0080.00818.62
8.3.30.0030.01019.04
8.3.20.0000.00820.29
8.3.10.0080.00022.09
8.3.00.0040.00422.50
8.2.180.0150.00616.75
8.2.170.0140.00022.96
8.2.160.0090.00620.93
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0050.00317.75
8.2.110.0030.00719.30
8.2.100.0070.00419.64
8.2.90.0030.00517.75
8.2.80.0040.00418.91
8.2.70.0080.00017.75
8.2.60.0090.00017.63
8.2.50.0040.00418.05
8.2.40.0040.00418.22
8.2.30.0040.00419.48
8.2.20.0040.00417.77
8.2.10.0000.00919.50
8.2.00.0050.00317.91
8.1.280.0130.00325.92
8.1.270.0040.00422.10
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00319.43
8.1.230.0090.00320.89
8.1.220.0040.00418.68
8.1.210.0080.00018.77
8.1.200.0030.00517.54
8.1.190.0080.00017.25
8.1.180.0000.00818.10
8.1.170.0080.00017.62
8.1.160.0000.00718.98
8.1.150.0040.00418.63
8.1.140.0030.00617.47
8.1.130.0030.00517.80
8.1.120.0000.00717.39
8.1.110.0020.00517.37
8.1.100.0040.00417.41
8.1.90.0000.00717.45
8.1.80.0000.00717.37
8.1.70.0000.00717.39
8.1.60.0050.00317.61
8.1.50.0020.00517.57
8.1.40.0080.00017.60
8.1.30.0000.00717.70
8.1.20.0000.00917.71
8.1.10.0030.00617.44
8.1.00.0000.00817.36
8.0.300.0070.00018.77
8.0.290.0000.00716.88
8.0.280.0070.00018.47
8.0.270.0030.00317.16
8.0.260.0030.00316.96
8.0.250.0070.00017.06
8.0.240.0040.00416.96
8.0.230.0000.00717.00
8.0.220.0000.00717.00
8.0.210.0000.00716.98
8.0.200.0090.00017.05
8.0.190.0000.00716.96
8.0.180.0000.00717.06
8.0.170.0030.00617.04
8.0.160.0050.00316.98
8.0.150.0000.00816.99
8.0.140.0000.00716.90
8.0.130.0060.00313.41
8.0.120.0040.00416.96
8.0.110.0060.00316.98
8.0.100.0040.00416.92
8.0.90.0000.00717.05
8.0.80.0080.00816.94
8.0.70.0070.00016.88
8.0.60.0000.00716.91
8.0.50.0000.00817.05
8.0.30.0060.01317.00
8.0.20.0110.00817.40
8.0.10.0040.00417.16
8.0.00.0130.00616.77
7.4.330.0000.00515.00
7.4.320.0000.00616.68
7.4.300.0000.00616.61
7.4.290.0000.00716.62
7.4.280.0000.00716.50
7.4.270.0000.00716.54
7.4.260.0080.00416.63
7.4.250.0000.00816.54
7.4.240.0040.00416.66
7.4.230.0000.00716.38
7.4.220.0160.01016.73
7.4.210.0070.00816.67
7.4.200.0000.00816.53
7.4.190.0020.00516.73
7.4.160.0090.00916.45
7.4.150.0060.01117.40
7.4.140.0120.00517.86
7.4.130.0130.00616.54
7.4.120.0090.00816.53
7.4.110.0160.00616.50
7.4.100.0100.00716.43
7.4.90.0120.00616.65
7.4.80.0080.00819.39
7.4.70.0110.00616.56
7.4.60.0060.00916.45
7.4.50.0000.00716.39
7.4.40.0090.00622.77
7.4.30.0100.00716.33
7.4.00.0080.00715.12
7.3.330.0020.00313.25
7.3.320.0050.00013.31
7.3.310.0070.00016.29
7.3.300.0030.00316.20
7.3.290.0080.00516.36
7.3.280.0060.01116.37
7.3.270.0090.00917.40
7.3.260.0070.01016.69
7.3.250.0050.01616.42
7.3.240.0070.01016.52
7.3.230.0070.01016.64
7.3.210.0100.00616.69
7.3.200.0070.01016.46
7.3.190.0160.00716.46
7.3.180.0000.01516.38
7.3.170.0000.01516.42
7.3.160.0130.00316.55
7.3.120.0050.00814.76
7.3.110.0000.01414.80
7.3.100.0040.01114.71
7.3.90.0000.00715.05
7.3.80.0060.01014.83
7.3.70.0070.00014.72
7.3.60.0000.01014.81
7.3.50.0100.00314.86
7.3.40.0080.00014.61
7.3.30.0090.00314.88
7.3.20.0040.00416.84
7.3.10.0120.00016.46
7.3.00.0000.01416.52
7.2.330.0070.01116.46
7.2.320.0060.01016.74
7.2.310.0120.00616.70
7.2.300.0090.00616.35
7.2.290.0070.01016.83
7.2.250.0060.01214.69
7.2.240.0030.01315.18
7.2.230.0090.00315.08
7.2.220.0070.00315.19
7.2.210.0100.00314.99
7.2.200.0070.01015.07
7.2.190.0100.00714.88
7.2.180.0030.00914.87
7.2.170.0100.00714.98
7.2.00.0070.00719.49
7.1.330.0030.00915.93
7.1.320.0000.00915.74
7.1.310.0070.01015.75
7.1.300.0000.01615.44
7.1.290.0090.00315.45
7.1.280.0030.00915.44
7.1.270.0060.00315.89
7.1.260.0090.00615.68
7.1.100.0030.01018.16
7.1.70.0070.00316.95
7.1.60.0100.01619.82
7.1.50.0090.01217.02
7.1.00.0000.08022.31
7.0.200.0100.00316.82
7.0.140.0030.07722.04
7.0.60.0130.04719.81
7.0.50.0100.03717.89
7.0.40.0070.08020.10
7.0.30.0200.07320.25
7.0.20.0270.08320.24
7.0.10.0100.05320.08
7.0.00.0100.06320.23
5.6.280.0030.07321.00
5.6.210.0070.05320.58
5.6.200.0030.07018.19
5.6.190.0030.09020.48
5.6.180.0100.07720.42
5.6.170.0230.04020.44
5.6.160.0030.06020.52
5.6.150.0100.04018.15
5.6.140.0070.03718.12
5.6.130.0000.05318.14
5.6.120.0030.05321.03
5.6.110.0030.04321.00
5.6.100.0130.08021.13
5.6.90.0030.09320.96
5.6.80.0170.07320.60
5.5.350.0000.04020.46
5.5.340.0030.08017.97
5.5.330.0030.06020.29
5.5.320.0030.08020.27
5.5.310.0330.06720.32
5.5.300.0100.06717.96
5.5.290.0030.06718.04
5.5.280.0100.08320.78
5.5.270.0030.08720.89
5.5.260.0100.08320.77
5.5.250.0170.06720.55
5.5.240.0030.07320.38
5.4.450.0900.04319.54
5.4.440.0400.05319.55
5.4.430.1070.00019.55
5.4.420.1370.00019.21
5.4.410.0070.08018.96
5.4.400.0200.05718.86
5.4.390.0100.07318.79
5.4.380.0270.06018.80
5.4.370.0200.05318.72
5.4.360.0200.04718.48
5.4.350.0230.04718.72
5.4.340.0170.05318.51
5.4.320.0070.03712.51
5.4.310.0060.05712.51
5.4.300.0060.03612.52
5.4.290.0060.04512.50
5.4.280.0060.03512.40
5.4.270.0040.04012.38
5.4.260.0040.04012.38
5.4.250.0060.03712.38
5.4.240.0050.03712.38
5.4.230.0050.04012.37
5.4.220.0080.03412.37
5.4.210.0030.03912.37
5.4.200.0050.04412.37
5.4.190.0050.03712.36
5.4.180.0070.03412.37
5.4.170.0050.03712.38
5.4.160.0070.03612.37
5.4.150.0100.03212.36
5.4.140.0050.03712.05
5.4.130.0040.03712.04
5.4.120.0070.03612.00
5.4.110.0060.03711.98
5.4.100.0080.04611.99
5.4.90.0070.03911.99
5.4.80.0040.03911.99
5.4.70.0050.03611.98
5.4.60.0030.03811.98
5.4.50.0020.04011.98
5.4.40.0080.03311.97
5.4.30.0090.04011.97
5.4.20.0070.03711.97
5.4.10.0010.03911.96
5.4.00.0030.03911.46
5.3.290.0070.04712.80
5.3.280.0050.03812.71
5.3.270.0070.03812.73
5.3.260.0060.03912.72
5.3.250.0040.03912.72
5.3.240.0050.03712.72
5.3.230.0060.03712.71
5.3.220.0040.03812.68
5.3.210.0080.03812.68
5.3.200.0030.03912.68
5.3.190.0050.03812.68
5.3.180.0090.03312.67
5.3.170.0030.05312.67
5.3.160.0070.04212.67
5.3.150.0120.04212.67
5.3.140.0060.03912.66
5.3.130.0050.04112.66
5.3.120.0050.04112.66
5.3.110.0040.04312.66
5.3.100.0080.03612.11
5.3.90.0060.03712.08
5.3.80.0090.03412.07
5.3.70.0070.04212.08
5.3.60.0090.04612.07
5.3.50.0140.04012.00
5.3.40.0070.04712.00
5.3.30.0090.03311.98
5.3.20.0020.03911.75
5.3.10.0070.03611.71
5.3.00.0040.04011.70
5.2.170.0080.0279.20
5.2.160.0030.0319.20
5.2.150.0070.0289.20
5.2.140.0060.0309.20
5.2.130.0060.0399.16
5.2.120.0050.0319.16
5.2.110.0090.0369.17
5.2.100.0070.0319.17
5.2.90.0080.0399.17
5.2.80.0080.0459.16
5.2.70.0070.0459.16
5.2.60.0070.0309.11
5.2.50.0060.0299.08
5.2.40.0040.0299.05
5.2.30.0040.0309.03
5.2.20.0050.0289.03
5.2.10.0060.0268.96
5.2.00.0050.0328.81
5.1.60.0040.0278.09
5.1.50.0040.0258.09
5.1.40.0070.0228.08
5.1.30.0040.0328.42
5.1.20.0080.0238.45
5.1.10.0080.0238.17
5.1.00.0090.0258.17
5.0.50.0040.0216.65
5.0.40.0040.0186.51
5.0.30.0040.0306.32
5.0.20.0020.0206.30
5.0.10.0030.0206.27
5.0.00.0050.0296.27
4.4.90.0020.0164.78
4.4.80.0010.0174.76
4.4.70.0000.0184.75
4.4.60.0030.0154.75
4.4.50.0040.0144.77
4.4.40.0010.0274.71
4.4.30.0030.0154.76
4.4.20.0020.0164.85
4.4.10.0030.0154.85
4.4.00.0020.0264.76
4.3.110.0030.0164.67
4.3.100.0010.0164.66
4.3.90.0020.0164.64
4.3.80.0030.0264.58
4.3.70.0020.0154.63
4.3.60.0030.0144.63
4.3.50.0050.0134.62
4.3.40.0030.0244.54
4.3.30.0030.0153.32
4.3.20.0020.0163.31
4.3.10.0020.0153.27
4.3.00.0030.02013.27

preferences:
111.6 ms | 401 KiB | 5 Q