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(2000000);

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.0190.00318.43
8.3.50.0230.00721.97
8.3.40.0140.00718.79
8.3.30.0100.00319.14
8.3.20.0070.00020.17
8.3.10.0080.00021.98
8.3.00.0040.00422.45
8.2.180.0120.00916.63
8.2.170.0120.00322.96
8.2.160.0040.01120.95
8.2.150.0030.00524.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0080.00019.51
8.2.110.0060.00322.16
8.2.100.0060.00617.84
8.2.90.0040.00419.15
8.2.80.0000.00818.05
8.2.70.0080.00017.63
8.2.60.0030.00617.93
8.2.50.0050.00318.07
8.2.40.0080.00018.22
8.2.30.0000.00718.16
8.2.20.0000.00717.87
8.2.10.0080.00019.66
8.2.00.0040.00417.89
8.1.280.0090.01225.92
8.1.270.0050.00222.23
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00023.80
8.1.230.0100.00018.97
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0090.00017.23
8.1.190.0040.00417.53
8.1.180.0050.00318.10
8.1.170.0040.00418.53
8.1.160.0020.00521.98
8.1.150.0050.00318.58
8.1.140.0040.00417.48
8.1.130.0000.00717.89
8.1.120.0070.00017.43
8.1.110.0070.00017.52
8.1.100.0000.00717.38
8.1.90.0040.00417.48
8.1.80.0000.00717.49
8.1.70.0040.00417.43
8.1.60.0040.00417.61
8.1.50.0040.00417.54
8.1.40.0040.00417.47
8.1.30.0040.00417.59
8.1.20.0030.00617.70
8.1.10.0040.00417.56
8.1.00.0040.00417.47
8.0.300.0040.00418.77
8.0.290.0040.00417.30
8.0.280.0000.00718.47
8.0.270.0030.00517.30
8.0.260.0000.00616.91
8.0.250.0030.00317.09
8.0.240.0000.00717.05
8.0.230.0000.00717.05
8.0.220.0000.00816.91
8.0.210.0000.00716.92
8.0.200.0030.00617.05
8.0.190.0040.00417.06
8.0.180.0040.00416.98
8.0.170.0040.00417.04
8.0.160.0040.00416.92
8.0.150.0040.00416.91
8.0.140.0000.00816.87
8.0.130.0000.00613.48
8.0.120.0030.00516.97
8.0.110.0000.00817.00
8.0.100.0050.00317.03
8.0.90.0040.00417.04
8.0.80.0140.00016.89
8.0.70.0080.00016.93
8.0.60.0070.00016.96
8.0.50.0050.00216.95
8.0.30.0100.01217.30
8.0.20.0120.00617.40
8.0.10.0000.00717.15
8.0.00.0110.01016.88
7.4.330.0050.00015.10
7.4.320.0000.00616.61
7.4.300.0030.00316.68
7.4.290.0030.00316.43
7.4.280.0000.00616.63
7.4.270.0030.00316.64
7.4.260.0000.00716.61
7.4.250.0030.00516.50
7.4.240.0050.00316.65
7.4.230.0070.00016.66
7.4.220.0070.01016.48
7.4.210.0080.00816.60
7.4.200.0030.00316.51
7.4.190.0000.00716.61
7.4.160.0150.00016.61
7.4.150.0090.00917.40
7.4.140.0130.00417.86
7.4.130.0090.01016.54
7.4.120.0150.00516.50
7.4.110.0100.00716.54
7.4.100.0130.00616.46
7.4.90.0140.00716.49
7.4.80.0170.00719.39
7.4.70.0000.01616.43
7.4.60.0080.01216.52
7.4.50.0040.00016.38
7.4.40.0110.00722.77
7.4.30.0080.00816.59
7.4.00.0120.00314.83
7.3.330.0030.00313.32
7.3.320.0030.00313.43
7.3.310.0040.00416.36
7.3.300.0000.00816.56
7.3.290.0040.01216.52
7.3.280.0080.01016.50
7.3.270.0070.01517.40
7.3.260.0070.01116.46
7.3.250.0090.00816.62
7.3.240.0110.00616.75
7.3.230.0090.00916.73
7.3.210.0070.01416.52
7.3.200.0120.00619.39
7.3.190.0000.01716.57
7.3.180.0080.00816.77
7.3.170.0100.00616.48
7.3.160.0040.01116.58
7.3.120.0080.00814.95
7.2.330.0140.00316.80
7.2.320.0140.00316.91
7.2.310.0000.02116.85
7.2.300.0140.00316.63
7.2.290.0060.01616.59
7.1.200.0100.00315.96
7.1.100.0070.00718.15
7.1.70.0070.00717.27
7.1.60.0100.01419.82
7.1.50.0090.00316.98
7.1.00.0100.07022.55
7.0.200.0100.00316.98
7.0.140.0030.06722.31
7.0.60.0000.04320.10
7.0.50.0030.08018.13
7.0.40.0070.05020.43
7.0.30.0330.06720.28
7.0.20.0200.08720.20
7.0.10.0400.04320.20
7.0.00.0000.05320.24
5.6.280.0030.07321.05
5.6.210.0030.07320.75
5.6.200.0070.06318.31
5.6.190.0030.09020.66
5.6.180.3430.04020.80
5.6.170.0200.08020.70
5.6.160.0030.04720.63
5.6.150.0030.04018.34
5.6.140.0070.06718.31
5.6.130.0070.06718.30
5.6.120.0170.06321.26
5.6.110.0200.07021.09
5.6.100.0030.04721.22
5.6.90.0070.07321.23
5.6.80.0070.08720.65
5.6.70.0330.06720.56
5.5.350.0030.08320.60
5.5.340.0070.08018.11
5.5.330.0100.03720.56
5.5.320.0330.04720.38
5.5.310.0200.03320.53
5.5.300.0030.06318.10
5.5.290.0100.05318.13
5.5.280.0030.06320.94
5.5.270.0030.09021.19
5.5.260.0130.08021.10
5.5.250.0130.07320.84
5.5.240.0070.04020.59
5.4.450.0500.04019.68
5.4.440.0170.04719.43
5.4.430.1500.00019.62
5.4.420.1700.00019.44
5.4.410.0030.06319.15
5.4.400.0100.05318.78
5.4.390.0200.06018.62
5.4.380.0330.05318.85
5.4.370.0200.04718.62
5.4.360.0170.04718.80
5.4.350.0170.05318.80
5.4.340.0200.04718.81
5.4.320.0040.03812.53
5.4.310.0080.03612.52
5.4.300.0080.03412.53
5.4.290.0050.03812.52
5.4.280.0090.03212.42
5.4.270.0080.04512.39
5.4.260.0070.05712.39
5.4.250.0120.03912.39
5.4.240.0060.03612.39
5.4.230.0020.04112.38
5.4.220.0080.04312.38
5.4.210.0040.03612.38
5.4.200.0070.03612.39
5.4.190.0040.03812.38
5.4.180.0040.03812.38
5.4.170.0050.03612.39
5.4.160.0070.03412.38
5.4.150.0030.03912.38
5.4.140.0050.03712.07
5.4.130.0040.03612.05
5.4.120.0080.03212.00
5.4.110.0030.03812.00
5.4.100.0030.03712.00
5.4.90.0070.03512.00
5.4.80.0090.03512.00
5.4.70.0060.04312.00
5.4.60.0040.04612.00
5.4.50.0060.03412.00
5.4.40.0020.03711.99
5.4.30.0070.03411.99
5.4.20.0090.03611.99
5.4.10.0070.03811.99
5.4.00.0100.03211.48
5.3.290.0070.04212.80
5.3.280.0080.03512.70
5.3.270.0080.03612.72
5.3.260.0080.03612.72
5.3.250.0100.04812.72
5.3.240.0070.04712.72
5.3.230.0040.04112.71
5.3.220.0060.03612.68
5.3.210.0060.03912.68
5.3.200.0090.03412.68
5.3.190.0060.03812.68
5.3.180.0070.03612.67
5.3.170.0050.03712.67
5.3.160.0030.03912.68
5.3.150.0090.05012.67
5.3.140.0120.03112.66
5.3.130.0060.03912.66
5.3.120.0060.03812.66
5.3.110.0090.03512.66
5.3.100.0060.04112.12
5.3.90.0040.03712.10
5.3.80.0070.03512.08
5.3.70.0030.03912.08
5.3.60.0050.03712.07
5.3.50.0040.03712.01
5.3.40.0100.03212.01
5.3.30.0040.03611.98
5.3.20.0060.03511.76
5.3.10.0030.03811.72
5.3.00.0060.04211.71
5.2.170.0050.0449.21
5.2.160.0050.0309.21
5.2.150.0050.0309.21
5.2.140.0030.0329.21
5.2.130.0060.0299.17
5.2.120.0070.0389.17
5.2.110.0050.0309.18
5.2.100.0030.0309.19
5.2.90.0040.0309.18
5.2.80.0050.0359.17
5.2.70.0050.0309.17
5.2.60.0050.0309.12
5.2.50.0030.0329.09
5.2.40.0030.0319.06
5.2.30.0030.0319.05
5.2.20.0050.0289.04
5.2.10.0030.0308.97
5.2.00.0060.0298.82
5.1.60.0060.0238.11
5.1.50.0030.0268.11
5.1.40.0030.0268.09
5.1.30.0010.0308.44
5.1.20.0040.0308.47
5.1.10.0050.0278.19
5.1.00.0010.0288.18
5.0.50.0030.0216.67
5.0.40.0030.0226.53
5.0.30.0060.0306.34
5.0.20.0050.0206.32
5.0.10.0040.0216.29
5.0.00.0050.0466.28
4.4.90.0040.0184.78
4.4.80.0040.0144.75
4.4.70.0030.0154.75
4.4.60.0020.0234.75
4.4.50.0030.0204.77
4.4.40.0040.0244.71
4.4.30.0020.0164.76
4.4.20.0030.0154.84
4.4.10.0040.0144.85
4.4.00.0020.0264.76
4.3.110.0040.0144.66
4.3.100.0020.0164.67
4.3.90.0030.0154.64
4.3.80.0030.0244.58
4.3.70.0030.0144.63
4.3.60.0020.0154.63
4.3.50.0020.0164.63
4.3.40.0020.0254.54
4.3.30.0020.0163.34
4.3.20.0020.0163.32
4.3.10.0000.0183.28
4.3.00.0000.02013.27

preferences:
47.14 ms | 400 KiB | 5 Q