3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (!function_exists('nice_number')) { function nice_number1($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 .= $n % 1000000000000 > 0 ? nice_number($n % 1000000000000) : ''; return $str; } else if ($n > 1000000000) { $str = round(($n / 1000000000), 0) . ' bn '; $str .= $n % 1000000000 > 0 ? nice_number($n % 1000000000) : ''; return $str; } else if ($n > 1000000) { $str = round(($n / 1000000), 0) . ' mn '; $str .= $n % 1000000 > 0 ? nice_number($n % 1000000) : ''; return $str; } else if ($n > 1000) return round(($n / 1000), 0) . ' K '; return number_format($n); } } echo nice_number(1300200000);

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.0120.00618.56
8.3.50.0060.01321.99
8.3.40.0150.00019.02
8.3.30.0090.00619.22
8.3.20.0050.00220.16
8.3.10.0080.00022.09
8.3.00.0090.00022.46
8.2.180.0110.00716.63
8.2.170.0120.00322.96
8.2.160.0030.01020.88
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00417.75
8.2.110.0060.00322.07
8.2.100.0080.00417.78
8.2.90.0040.00419.25
8.2.80.0000.00818.04
8.2.70.0040.00417.50
8.2.60.0040.00418.04
8.2.50.0050.00318.07
8.2.40.0080.00018.09
8.2.30.0030.00618.08
8.2.20.0040.00417.75
8.2.10.0040.00417.64
8.2.00.0070.00017.68
8.1.280.0140.01025.92
8.1.270.0000.00822.18
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0030.00623.93
8.1.230.0100.00318.96
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0000.00917.23
8.1.190.0040.00417.30
8.1.180.0000.00918.10
8.1.170.0040.00418.64
8.1.160.0040.00422.03
8.1.150.0040.00418.58
8.1.140.0040.00417.46
8.1.130.0000.00717.82
8.1.120.0000.00717.33
8.1.110.0000.00717.29
8.1.100.0040.00417.29
8.1.90.0000.00817.34
8.1.80.0050.00317.41
8.1.70.0040.00417.36
8.1.60.0040.00417.58
8.1.50.0030.00617.46
8.1.40.0070.00017.46
8.1.30.0050.00217.42
8.1.20.0040.00417.52
8.1.10.0070.00017.52
8.1.00.0030.00717.40
8.0.300.0040.00418.77
8.0.290.0080.00017.18
8.0.280.0030.00318.46
8.0.270.0030.00317.18
8.0.260.0000.00616.90
8.0.250.0000.00817.01
8.0.240.0020.00516.96
8.0.230.0030.00316.92
8.0.220.0000.00716.86
8.0.210.0020.00516.97
8.0.200.0040.00416.96
8.0.190.0030.00617.04
8.0.180.0000.00716.97
8.0.170.0080.00016.92
8.0.160.0000.00716.84
8.0.150.0070.00017.03
8.0.140.0000.00716.93
8.0.130.0080.00013.40
8.0.120.0040.00416.84
8.0.110.0050.00317.01
8.0.100.0040.00416.85
8.0.90.0040.00417.04
8.0.80.0100.00417.01
8.0.70.0080.00017.01
8.0.60.0040.00417.04
8.0.50.0050.00216.94
8.0.30.0130.00817.18
8.0.20.0050.01417.40
8.0.10.0040.00417.01
8.0.00.0130.00416.78
7.4.330.0000.00515.00
7.4.320.0070.00016.44
7.4.300.0030.00316.45
7.4.290.0030.00316.52
7.4.280.0030.00316.46
7.4.270.0040.00416.37
7.4.260.0060.00316.38
7.4.250.0050.00216.40
7.4.240.0010.00616.47
7.4.230.0040.00416.40
7.4.220.0140.01416.63
7.4.210.0020.01316.54
7.4.200.0080.00016.57
7.4.190.0050.00216.51
7.4.160.0130.00316.73
7.4.150.0030.01517.40
7.4.140.0130.00817.86
7.4.130.0110.01016.51
7.4.120.0120.00716.48
7.4.110.0200.00316.73
7.4.100.0120.00616.31
7.4.90.0110.00616.57
7.4.80.0110.00619.39
7.4.70.0150.00316.43
7.4.60.0100.00716.46
7.4.50.0000.01116.25
7.4.40.0060.00922.77
7.4.30.0060.01016.34
7.4.00.0100.00714.84
7.3.330.0030.00313.13
7.3.320.0000.00513.29
7.3.310.0000.00716.35
7.3.300.0030.00316.36
7.3.290.0070.00716.31
7.3.280.0110.00916.31
7.3.270.0120.00617.40
7.3.260.0120.01216.61
7.3.250.0080.01016.26
7.3.240.0120.00916.46
7.3.230.0090.00916.55
7.3.210.0100.00616.54
7.3.200.0030.01619.39
7.3.190.0090.01016.57
7.3.180.0130.00316.38
7.3.170.0140.00316.43
7.3.160.0120.00416.27
7.3.120.0030.01214.84
7.3.110.0040.01414.85
7.3.100.0050.01214.56
7.3.90.0070.00714.96
7.3.80.0030.01314.99
7.3.70.0040.00914.70
7.3.60.0030.01014.82
7.3.50.0080.00214.73
7.3.40.0090.00314.46
7.3.30.0050.00914.79
7.3.20.0050.00816.37
7.3.10.0090.00616.57
7.3.00.0060.00916.59
7.2.330.0110.00516.43
7.2.320.0030.01616.71
7.2.310.0060.01516.70
7.2.300.0100.01316.67
7.2.290.0030.01916.54
7.2.250.0030.01615.11
7.2.240.0080.01014.84
7.2.230.0060.01014.94
7.2.220.0070.00914.94
7.2.210.0070.00814.78
7.2.200.0080.00314.73
7.2.190.0080.00514.88
7.2.180.0050.01215.05
7.2.170.0090.00614.88
7.2.130.0050.01016.85
7.2.120.0050.00416.70
7.2.110.0040.00916.79
7.2.100.0030.00816.88
7.2.90.0100.00516.68
7.2.80.0060.00816.81
7.2.70.0020.01016.58
7.2.60.0080.00816.59
7.2.50.0020.01116.70
7.2.40.0060.00616.81
7.2.30.0040.01016.87
7.2.20.0070.00716.75
7.2.10.0050.00916.78
7.2.00.0050.00717.41
7.1.330.0050.00815.59
7.1.320.0030.00815.62
7.1.310.0070.00815.63
7.1.300.0030.01015.71
7.1.290.0090.00615.73
7.1.280.0010.00815.64
7.1.270.0040.00615.64
7.1.260.0070.00815.61
7.1.250.0040.00815.82
7.1.240.0120.00315.79
7.1.230.0040.01115.82
7.1.220.0060.00615.66
7.1.210.0000.01515.74
7.1.200.0020.01315.61
7.1.190.0060.00615.77
7.1.180.0070.00715.66
7.1.170.0160.00015.68
7.1.160.0000.01315.78
7.1.150.0040.00415.77
7.1.140.0060.01215.44
7.1.130.0040.00415.70
7.1.120.0040.00715.44
7.1.110.0110.00415.59
7.1.100.0060.00516.87
7.1.90.0000.01215.71
7.1.80.0130.00015.47
7.1.70.0040.00916.34
7.1.60.0090.00917.73
7.1.50.0000.01316.31
7.1.40.0030.01015.57
7.1.30.0070.00315.78
7.1.20.0030.01015.46
7.1.10.0040.01115.67
7.1.00.0030.04518.86
7.0.330.0070.00815.38
7.0.320.0080.00415.48
7.0.310.0000.00915.21
7.0.300.0030.00515.33
7.0.290.0040.00415.43
7.0.280.0000.01415.35
7.0.270.0110.00415.06
7.0.260.0030.01015.37
7.0.250.0080.00415.48
7.0.240.0070.00715.59
7.0.230.0070.00015.41
7.0.220.0070.00715.08
7.0.210.0030.00615.55
7.0.200.0080.00516.05
7.0.190.0060.00615.21
7.0.180.0000.00815.41
7.0.170.0030.01015.43
7.0.160.0000.01515.61
7.0.150.0070.00715.15
7.0.140.0030.04318.65
7.0.130.0000.01015.48
7.0.120.0060.00615.42
7.0.110.0100.00315.33
7.0.100.0060.00615.52
7.0.90.0030.00515.16
7.0.80.0040.00715.36
7.0.70.0050.00515.14
7.0.60.0080.03317.65
7.0.50.0080.02516.59
7.0.40.0090.04316.79
7.0.30.0100.04116.91
7.0.20.0170.04316.79
7.0.10.0040.04716.79
7.0.00.0100.03916.84
5.6.380.0070.00714.39
5.6.370.0030.01013.95
5.6.360.0030.01114.10
5.6.350.0070.00714.37
5.6.340.0090.00014.26
5.6.330.0060.01014.46
5.6.320.0070.00714.46
5.6.310.0090.00614.06
5.6.300.0070.00314.38
5.6.290.0070.00714.07
5.6.280.0060.00614.13
5.6.270.0060.00614.14
5.6.260.0030.01014.34
5.6.250.0120.00014.33
5.6.240.0060.00314.27
5.6.230.0080.00313.96
5.6.220.0080.00313.78
5.6.210.0030.04417.33
5.6.200.0070.04716.09
5.6.190.0030.02617.28
5.6.180.0080.04517.30
5.6.170.0110.03517.43
5.6.160.0070.04517.40
5.6.150.0080.04316.07
5.6.140.0080.04416.23
5.6.130.0070.03816.04
5.6.120.0100.04017.53
5.6.110.0110.03617.69
5.6.100.0080.04517.59
5.6.90.0090.04017.60
5.6.80.0100.04017.34
5.6.70.0030.00714.27
5.6.60.0120.00614.12
5.6.50.0000.01513.96
5.6.40.0030.01314.23
5.6.30.0070.00714.37
5.6.20.0100.00314.43
5.6.10.0130.00314.11
5.6.00.0070.00714.25
5.5.380.0060.00311.05
5.5.370.0070.00411.19
5.5.360.0080.00410.88
5.5.350.0030.01915.59
5.5.340.0050.02514.56
5.5.330.0000.02815.68
5.5.320.0150.02815.58
5.5.310.0160.03215.56
5.5.300.0030.03614.51
5.5.290.0100.03814.59
5.5.280.0050.04716.10
5.5.270.0070.04415.97
5.5.260.0020.03615.93
5.5.250.0100.03815.85
5.5.240.0100.02015.64
5.5.230.0040.00810.86
5.5.220.0000.01210.70
5.5.210.0000.01110.75
5.5.200.0060.00610.99
5.5.190.0070.00311.19
5.5.180.0090.00310.84
5.5.170.0040.00810.97
5.5.160.0070.00311.11
5.5.150.0060.00610.75
5.5.140.0000.01011.11
5.5.130.0080.00411.02
5.5.120.0030.00610.95
5.5.110.0030.00610.67
5.5.100.0110.00010.96
5.5.90.0000.01010.98
5.5.80.0060.00010.86
5.5.70.0000.00810.91
5.5.60.0040.00411.00
5.5.50.0040.00811.06
5.5.40.0070.00310.80
5.5.30.0060.00310.84
5.5.20.0090.00310.76
5.5.10.0090.00310.81
5.5.00.0040.00810.71
5.4.450.0120.02515.17
5.4.440.0070.01715.16
5.4.430.0890.00115.30
5.4.420.0810.00015.21
5.4.410.0080.03214.84
5.4.400.0070.03214.83
5.4.390.0050.03114.76
5.4.380.0150.03014.59
5.4.370.0140.02314.86
5.4.360.0120.02714.80
5.4.350.0080.03014.81
5.4.340.0100.02814.71
5.4.330.0000.01310.82
5.4.320.0020.02711.84
5.4.310.0040.02211.62
5.4.300.0050.02111.81
5.4.290.0020.02511.62
5.4.280.0090.01811.57
5.4.270.0040.02211.71
5.4.260.0020.02311.62
5.4.250.0050.02311.63
5.4.240.0020.02211.39
5.4.230.0060.01911.81
5.4.220.0050.02311.63
5.4.210.0050.01911.40
5.4.200.0040.02411.64
5.4.190.0040.02111.79
5.4.180.0070.01811.49
5.4.170.0030.02111.51
5.4.160.0070.01911.78
5.4.150.0020.02311.57
5.4.140.0060.02011.49
5.4.130.0040.02311.40
5.4.120.0040.02211.33
5.4.110.0060.01711.46
5.4.100.0060.01811.30
5.4.90.0040.02211.37
5.4.80.0050.02011.45
5.4.70.0060.01711.46
5.4.60.0060.02011.55
5.4.50.0070.01811.39
5.4.40.0060.01811.47
5.4.30.0040.02211.38
5.4.20.0050.02111.47
5.4.10.0020.02511.44
5.4.00.0040.02311.05
5.3.290.0060.02311.70
5.3.280.0060.01811.57
5.3.270.0030.02511.62
5.3.260.0050.02011.64
5.3.250.0060.02111.65
5.3.240.0060.02111.56
5.3.230.0080.02111.62
5.3.220.0060.02011.58
5.3.210.0060.02111.50
5.3.200.0090.01811.56
5.3.190.0040.02111.53
5.3.180.0060.02011.66
5.3.170.0050.02211.63
5.3.160.0050.02111.67
5.3.150.0040.02211.64
5.3.140.0050.02011.63
5.3.130.0050.02211.70
5.3.120.0050.02311.66
5.3.110.0030.02511.49
5.3.100.0040.02111.31
5.3.90.0060.01911.39
5.3.80.0040.02111.26
5.3.70.0030.02311.26
5.3.60.0050.01911.29
5.3.50.0090.01711.24
5.3.40.0050.01811.23
5.3.30.0030.02011.11
5.3.20.0040.02410.98
5.3.10.0050.01911.00
5.3.00.0050.02110.99
5.2.170.0040.0189.56
5.2.160.0030.0169.56
5.2.150.0030.0199.56
5.2.140.0040.0199.56
5.2.130.0020.0209.54
5.2.120.0070.0149.54
5.2.110.0060.0149.54
5.2.100.0040.0189.54
5.2.90.0020.0179.54
5.2.80.0010.0199.54
5.2.70.0020.0209.54
5.2.60.0050.0189.51
5.2.50.0020.0209.50
5.2.40.0060.0159.49
5.2.30.0050.0169.48
5.2.20.0020.0199.47
5.2.10.0040.0159.43
5.2.00.0060.0139.36
5.1.60.0020.0149.00
5.1.50.0040.0149.00
5.1.40.0010.0168.99
5.1.30.0040.0159.16
5.1.20.0050.0149.18
5.1.10.0020.0179.04
5.1.00.0040.0149.04
5.0.50.0040.0128.28
5.0.40.0020.0128.21
5.0.30.0030.0178.12
5.0.20.0030.0128.10
5.0.10.0040.0118.09
5.0.00.0030.0178.08
4.4.90.0020.0107.35
4.4.80.0020.0097.34
4.4.70.0030.0087.34
4.4.60.0050.0077.34
4.4.50.0030.0087.35
4.4.40.0030.0147.32
4.4.30.0040.0077.34
4.4.20.0030.0087.39
4.4.10.0030.0097.39
4.4.00.0030.0147.34
4.3.110.0010.0117.30
4.3.100.0010.0117.30
4.3.90.0030.0107.28
4.3.80.0020.0137.25
4.3.70.0040.0077.28
4.3.60.0020.0097.28
4.3.50.0040.0077.28
4.3.40.0050.0117.23
4.3.30.0010.0106.62
4.3.20.0000.0116.61
4.3.10.0030.0096.59
4.3.00.0080.01011.60

preferences:
67.66 ms | 401 KiB | 5 Q