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), 2) . ' K '; return number_format($n); } } echo nice_number(320500000);

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.0140.00718.18
8.3.50.0060.00921.96
8.3.40.0110.00418.84
8.3.30.0040.01119.17
8.3.20.0040.00420.46
8.3.10.0040.00421.96
8.3.00.0000.00822.39
8.2.180.0160.00616.50
8.2.170.0060.00922.96
8.2.160.0100.00321.11
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00419.48
8.2.110.0060.00322.38
8.2.100.0000.01118.03
8.2.90.0050.00319.17
8.2.80.0000.00817.97
8.2.70.0060.00317.63
8.2.60.0000.00918.16
8.2.50.0000.00818.07
8.2.40.0080.00018.07
8.2.30.0040.00418.30
8.2.20.0000.00917.78
8.2.10.0040.00419.74
8.2.00.0040.00418.00
8.1.280.0060.00925.92
8.1.270.0080.00022.05
8.1.260.0090.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00924.04
8.1.230.0070.00419.13
8.1.220.0060.00317.79
8.1.210.0040.00418.77
8.1.200.0040.00417.47
8.1.190.0030.00617.53
8.1.180.0060.00318.10
8.1.170.0050.00318.45
8.1.160.0040.00421.98
8.1.150.0080.00018.71
8.1.140.0040.00417.54
8.1.130.0030.00317.92
8.1.120.0070.00017.46
8.1.110.0000.00717.57
8.1.100.0000.00817.61
8.1.90.0070.00017.40
8.1.80.0040.00417.54
8.1.70.0000.00817.43
8.1.60.0050.00217.73
8.1.50.0000.00717.49
8.1.40.0080.00017.52
8.1.30.0040.00417.70
8.1.20.0040.00417.79
8.1.10.0040.00417.50
8.1.00.0000.00917.49
8.0.300.0000.00718.77
8.0.290.0040.00417.18
8.0.280.0030.00518.52
8.0.270.0070.00017.27
8.0.260.0070.00016.93
8.0.250.0070.00017.07
8.0.240.0000.00817.01
8.0.230.0070.00017.03
8.0.220.0050.00317.05
8.0.210.0000.00716.92
8.0.200.0000.00717.10
8.0.190.0040.00417.14
8.0.180.0000.00717.00
8.0.170.0030.00617.10
8.0.160.0000.00716.96
8.0.150.0000.00817.01
8.0.140.0030.00517.04
8.0.130.0060.00313.46
8.0.120.0080.00016.93
8.0.110.0070.00017.09
8.0.100.0030.00417.00
8.0.90.0050.00217.16
8.0.80.0040.01017.04
8.0.70.0000.00816.91
8.0.60.0000.00717.07
8.0.50.0030.00517.07
8.0.30.0140.00917.23
8.0.20.0080.01217.40
8.0.10.0070.00017.02
8.0.00.0120.00617.02
7.4.330.0050.00015.19
7.4.320.0030.00316.70
7.4.300.0000.00616.58
7.4.290.0000.00716.60
7.4.280.0050.00216.72
7.4.270.0060.00016.46
7.4.260.0070.00316.66
7.4.250.0000.00916.54
7.4.240.0000.00716.58
7.4.230.0040.00416.58
7.4.220.0140.00716.72
7.4.210.0080.00916.68
7.4.200.0070.00016.44
7.4.190.0000.00716.65
7.4.160.0060.00916.59
7.4.150.0070.01417.40
7.4.140.0060.01117.86
7.4.130.0120.00616.56
7.4.120.0100.01016.66
7.4.110.0140.00316.67
7.4.100.0120.00616.50
7.4.90.0150.00316.54
7.4.80.0100.00719.39
7.4.70.0000.01516.63
7.4.60.0040.01216.52
7.4.50.0040.00016.64
7.4.40.0090.00922.77
7.4.30.0040.01316.70
7.4.00.0070.00915.21
7.3.330.0000.00613.31
7.3.320.0000.00513.25
7.3.310.0030.00316.47
7.3.300.0030.00316.47
7.3.290.0090.00616.46
7.3.280.0070.01116.44
7.3.270.0100.00717.40
7.3.260.0100.00716.46
7.3.250.0110.01116.49
7.3.240.0080.00816.60
7.3.230.0070.01416.67
7.3.210.0060.01116.41
7.3.200.0100.00616.47
7.3.190.0160.00616.74
7.3.180.0060.01316.54
7.3.170.0090.00616.45
7.3.160.0050.01016.38
7.3.120.0090.00914.92
7.3.110.0030.01415.03
7.3.100.0100.00714.92
7.3.90.0100.00014.91
7.3.80.0070.00414.87
7.3.70.0070.00714.79
7.3.60.0080.00014.56
7.3.50.0070.00714.75
7.3.40.0000.01315.05
7.3.30.0070.00414.97
7.3.20.0070.00416.62
7.3.10.0030.01016.34
7.3.00.0090.00616.58
7.2.330.0070.01016.78
7.2.320.0140.00316.84
7.2.310.0160.00616.47
7.2.300.0120.00616.88
7.2.290.0030.01516.84
7.2.250.0070.01314.79
7.2.240.0060.01114.96
7.2.230.0070.00715.08
7.2.220.0030.00615.24
7.2.210.0000.01315.28
7.2.200.0060.01015.02
7.2.190.0040.01114.95
7.2.180.0040.01114.90
7.2.170.0000.01214.95
7.2.00.0060.00919.37
7.1.330.0030.01015.82
7.1.320.0000.01015.56
7.1.310.0080.00815.62
7.1.300.0040.01115.93
7.1.290.0060.00915.91
7.1.280.0100.00715.87
7.1.270.0000.01215.86
7.1.260.0090.00615.94
7.1.200.0040.01015.55
7.1.100.0040.01118.09
7.1.70.0030.00617.08
7.1.60.0140.01119.82
7.1.50.0040.00716.96
7.1.00.0030.07022.48
7.0.200.0090.00416.82
7.0.140.0000.07722.09
7.0.60.0100.05319.88
7.0.50.0100.03717.89
7.0.40.0070.08720.25
7.0.30.0230.05020.21
7.0.20.0270.05020.03
7.0.10.0330.07720.23
7.0.00.0100.07020.23
5.6.280.0030.07321.08
5.6.210.0100.07720.66
5.6.200.0030.08718.16
5.6.190.0030.06720.57
5.6.180.3170.04720.57
5.6.170.0230.04020.44
5.6.160.0030.09020.63
5.6.150.0070.04718.13
5.6.140.0030.04018.18
5.6.130.0100.08018.27
5.6.120.0070.08721.02
5.6.110.0070.07321.01
5.6.100.0100.08320.89
5.6.90.0000.05020.97
5.6.80.0100.06020.36
5.6.70.0370.06720.54
5.5.350.0030.06320.38
5.5.340.0100.04717.94
5.5.330.0100.08020.38
5.5.320.0370.07020.30
5.5.310.0170.04320.28
5.5.300.0030.08318.06
5.5.290.0070.06318.03
5.5.280.0100.07720.78
5.5.270.0030.08320.96
5.5.260.0100.07020.94
5.5.250.0100.07020.72
5.5.240.0100.05720.16
5.4.450.0530.04319.20
5.4.440.0370.03319.41
5.4.430.1470.00019.21
5.4.420.1430.00019.63
5.4.410.0030.06018.86
5.4.400.0130.05018.67
5.4.390.0230.04318.76
5.4.380.0230.05318.75
5.4.370.0100.05718.56
5.4.360.0100.05718.56
5.4.350.0130.06018.79
5.4.340.0170.05018.75
5.4.320.0060.04112.52
5.4.310.0100.05412.51
5.4.300.0050.04112.52
5.4.290.0050.03812.51
5.4.280.0100.04712.41
5.4.270.0050.04012.38
5.4.260.0060.03712.38
5.4.250.0060.03712.38
5.4.240.0080.03812.38
5.4.230.0050.04012.38
5.4.220.0100.03212.37
5.4.210.0110.03712.37
5.4.200.0050.04212.37
5.4.190.0080.03612.37
5.4.180.0090.03212.36
5.4.170.0070.03712.38
5.4.160.0040.03812.38
5.4.150.0050.03612.37
5.4.140.0060.04012.05
5.4.130.0010.03912.04
5.4.120.0050.03712.00
5.4.110.0090.03512.00
5.4.100.0050.03711.99
5.4.90.0040.04012.00
5.4.80.0090.04812.00
5.4.70.0050.05111.98
5.4.60.0050.05111.99
5.4.50.0090.04711.99
5.4.40.0070.04811.98
5.4.30.0070.04911.97
5.4.20.0100.04711.97
5.4.10.0040.03811.97
5.4.00.0060.03711.46
5.3.290.0060.04012.80
5.3.280.0050.04012.71
5.3.270.0080.05412.72
5.3.260.0050.04312.71
5.3.250.0070.05312.72
5.3.240.0050.04012.72
5.3.230.0020.04212.71
5.3.220.0080.03412.68
5.3.210.0050.04012.68
5.3.200.0080.03712.68
5.3.190.0040.04712.67
5.3.180.0030.04612.67
5.3.170.0020.04012.67
5.3.160.0030.03912.68
5.3.150.0060.04012.67
5.3.140.0070.03612.66
5.3.130.0070.03912.66
5.3.120.0100.03612.66
5.3.110.0020.04412.66
5.3.100.0030.04012.12
5.3.90.0050.03912.09
5.3.80.0040.03812.08
5.3.70.0090.03312.08
5.3.60.0060.03712.07
5.3.50.0110.04212.00
5.3.40.0060.03812.00
5.3.30.0020.04211.97
5.3.20.0040.03911.75
5.3.10.0040.03711.71
5.3.00.0070.03611.70
5.2.170.0040.0329.21
5.2.160.0050.0299.21
5.2.150.0070.0319.21
5.2.140.0060.0419.21
5.2.130.0040.0329.17
5.2.120.0020.0339.17
5.2.110.0070.0329.18
5.2.100.0080.0379.19
5.2.90.0050.0309.18
5.2.80.0060.0299.18
5.2.70.0070.0289.17
5.2.60.0020.0379.12
5.2.50.0050.0309.09
5.2.40.0020.0319.06
5.2.30.0040.0319.04
5.2.20.0050.0289.04
5.2.10.0040.0298.97
5.2.00.0040.0318.82
5.1.60.0030.0278.10
5.1.50.0050.0258.10
5.1.40.0050.0258.09
5.1.30.0050.0258.44
5.1.20.0080.0288.46
5.1.10.0080.0268.18
5.1.00.0060.0318.18
5.0.50.0020.0296.66
5.0.40.0030.0306.52
5.0.30.0040.0326.34
5.0.20.0040.0196.31
5.0.10.0040.0206.29
5.0.00.0020.0336.28
4.4.90.0030.0214.78
4.4.80.0040.0204.76
4.4.70.0030.0214.76
4.4.60.0070.0204.75
4.4.50.0010.0214.77
4.4.40.0030.0244.70
4.4.30.0030.0154.76
4.4.20.0040.0144.84
4.4.10.0030.0154.85
4.4.00.0010.0264.76
4.3.110.0030.0154.67
4.3.100.0020.0154.66
4.3.90.0030.0144.63
4.3.80.0040.0234.58
4.3.70.0030.0144.63
4.3.60.0020.0154.63
4.3.50.0050.0134.63
4.3.40.0030.0244.54
4.3.30.0050.0183.34
4.3.20.0030.0203.33
4.3.10.0040.0173.29
4.3.00.0000.01713.27

preferences:
68.13 ms | 401 KiB | 5 Q