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

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.01018.43
8.3.50.0120.00921.99
8.3.40.0110.00418.82
8.3.30.0170.00018.88
8.3.20.0070.00018.77
8.3.10.0080.00020.45
8.3.00.0060.00317.71
8.2.180.0120.00616.50
8.2.170.0000.01522.96
8.2.160.0100.00322.13
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0090.00026.16
8.2.120.0030.00519.95
8.2.110.0060.00322.07
8.2.100.0040.00818.03
8.2.90.0040.00419.18
8.2.80.0050.00317.97
8.2.70.0090.00017.38
8.2.60.0030.00617.93
8.2.50.0040.00418.07
8.2.40.0040.00418.22
8.2.30.0050.00519.97
8.2.20.0050.00217.73
8.2.10.0000.00717.84
8.2.00.0000.00817.89
8.1.280.0120.00925.92
8.1.270.0040.00423.99
8.1.260.0030.00526.35
8.1.250.0030.00528.09
8.1.240.0110.01122.61
8.1.230.0070.00420.95
8.1.220.0050.00318.77
8.1.210.0060.00318.84
8.1.200.0060.00317.13
8.1.190.0020.00517.53
8.1.180.0040.00418.10
8.1.170.0000.00718.90
8.1.160.0000.00718.92
8.1.150.0000.00718.64
8.1.140.0040.00417.53
8.1.130.0000.00817.87
8.1.120.0050.00317.52
8.1.110.0070.00017.50
8.1.100.0040.00417.38
8.1.90.0070.00017.49
8.1.80.0030.00317.40
8.1.70.0030.00517.44
8.1.60.0090.00017.61
8.1.50.0000.00717.38
8.1.40.0000.00817.56
8.1.30.0000.00817.53
8.1.20.0040.00417.52
8.1.10.0050.00317.55
8.1.00.0040.00417.36
8.0.300.0030.00620.03
8.0.290.0000.00716.75
8.0.280.0000.00718.39
8.0.270.0070.00017.27
8.0.260.0040.00416.91
8.0.250.0080.00017.02
8.0.240.0000.01216.95
8.0.230.0040.00417.08
8.0.220.0070.00016.89
8.0.210.0000.00716.89
8.0.200.0060.00017.09
8.0.190.0040.00416.93
8.0.180.0040.00416.91
8.0.170.0060.00316.87
8.0.160.0000.00716.95
8.0.150.0050.00316.90
8.0.140.0040.00416.93
8.0.130.0050.00013.41
8.0.120.0040.00416.98
8.0.110.0040.00416.76
8.0.100.0040.00416.90
8.0.90.0000.00817.02
8.0.80.0140.00016.95
8.0.70.0030.00517.02
8.0.60.0040.00416.82
8.0.50.0080.00016.88
8.0.30.0120.00917.21
8.0.20.0130.00617.41
8.0.10.0080.00016.95
8.0.00.0080.01016.82
7.4.330.0020.00214.65
7.4.320.0000.00616.55
7.4.300.0060.00016.53
7.4.290.0040.00416.62
7.4.280.0030.00616.55
7.4.270.0030.00316.62
7.4.260.0050.00013.31
7.4.250.0040.00416.46
7.4.240.0070.00016.68
7.4.230.0000.00716.38
7.4.220.0070.01016.54
7.4.210.0070.00916.65
7.4.200.0030.00316.51
7.4.190.0040.00416.49
7.4.160.0110.00716.75
7.4.150.0140.00517.40
7.4.140.0060.01817.26
7.4.130.0110.00616.43
7.4.120.0130.00316.51
7.4.110.0090.00916.67
7.4.100.0070.01316.75
7.4.90.0110.00916.57
7.4.80.0120.00419.03
7.4.70.0060.01616.61
7.4.60.0090.00616.50
7.4.50.0030.00316.43
7.4.40.0080.00522.27
7.4.30.0100.00616.44
7.4.00.0090.00614.73
7.3.330.0020.00213.53
7.3.320.0000.00613.27
7.3.310.0070.00016.61
7.3.300.0000.00716.58
7.3.290.0070.00716.48
7.3.280.0050.01116.50
7.3.270.0090.00917.40
7.3.260.0080.01018.24
7.3.250.0050.01516.53
7.3.240.0100.00916.77
7.3.230.0100.00716.64
7.3.210.0110.00616.82
7.3.200.0150.00619.39
7.3.190.0070.01116.45
7.3.180.0090.00616.66
7.3.170.0140.00316.77
7.3.160.0090.01416.49
7.3.120.0130.00014.81
7.3.10.0190.00416.12
7.3.00.0130.01116.09
7.2.330.0060.01216.63
7.2.320.0060.01116.82
7.2.310.0030.01316.60
7.2.300.0040.01216.51
7.2.290.0130.00316.80
7.2.130.0200.00516.90
7.2.120.0210.00216.80
7.2.110.0200.00316.49
7.2.100.0160.01016.78
7.2.90.0150.01216.21
7.2.80.0080.01616.91
7.2.70.0130.00716.59
7.2.60.0190.00816.83
7.2.50.0070.01116.86
7.2.40.0130.00716.65
7.2.30.0100.00716.42
7.2.20.0140.00315.92
7.2.10.0130.00516.24
7.2.00.0120.00517.85
7.1.250.0160.00415.33
7.1.100.0030.00718.09
7.1.70.0030.00717.35
7.1.60.0060.01819.40
7.1.50.0090.01317.01
7.1.00.0000.08022.54
7.0.200.0040.00714.73
7.0.140.0070.07022.26
7.0.60.0000.08720.19
7.0.50.0070.06018.16
7.0.40.0170.04020.34
7.0.30.0270.05720.47
7.0.20.0270.08320.31
7.0.10.0070.09020.31
7.0.00.0070.08720.29
5.6.280.0100.06721.34
5.6.210.0000.04320.76
5.6.200.0070.08318.40
5.6.190.0070.05320.60
5.6.180.0200.08320.51
5.6.170.0200.06020.62
5.6.160.0030.04320.73
5.6.150.0100.07018.32
5.6.140.0130.03018.46
5.6.130.0070.05018.30
5.6.120.0130.03721.29
5.6.110.0000.04321.19
5.6.100.0000.06321.23
5.6.90.0070.08721.25
5.6.80.0030.08320.63
5.6.70.0330.06720.66
5.5.350.4170.03320.58
5.5.340.0070.04318.24
5.5.330.0100.08020.47
5.5.320.0270.07020.44
5.5.310.0170.04320.51
5.5.300.0070.08318.27
5.5.290.0070.05318.06
5.5.280.0070.08320.94
5.5.270.0070.08721.04
5.5.260.0070.08721.05
5.5.250.0170.07720.86
5.5.240.0130.07720.32
5.4.450.0270.07719.39
5.4.440.0270.07319.54
5.4.430.0270.07719.80
5.4.420.0200.06719.82
5.4.410.0170.05019.41
5.4.400.0270.05319.27
5.4.390.0200.08319.18
5.4.380.0100.05319.27
5.4.370.0230.06019.37
5.4.360.0200.07719.34
5.4.350.0200.07719.35
5.4.340.0270.06719.29
5.4.320.0200.05719.20
5.4.310.0270.06719.50
5.4.300.0270.06019.25
5.4.290.0200.07319.11
5.4.280.0270.05719.38
5.4.270.0200.07719.34
5.4.260.0230.07319.39
5.4.250.0270.06719.19
5.4.240.0270.06319.36
5.4.230.0330.06019.20
5.4.220.0130.07719.17
5.4.210.0200.06319.36
5.4.200.0230.08319.21
5.4.190.0300.07319.09
5.4.180.0270.06719.22
5.4.170.0370.04019.26
5.4.160.0300.07319.14
5.4.150.0270.05019.16
5.4.140.0130.05316.54
5.4.130.0200.03716.60
5.4.120.0170.03716.51
5.4.110.0230.03316.58
5.4.100.0300.04016.45
5.4.90.0170.05016.66
5.4.80.0200.04716.61
5.4.70.0270.06316.59
5.4.60.0230.06016.47
5.4.50.0200.06316.72
5.4.40.0170.06016.42
5.4.30.0030.06716.63
5.4.20.0070.07716.44
5.4.10.0130.04716.72
5.4.00.0000.07315.99
5.3.290.0170.07714.82
5.3.280.0170.07314.88
5.3.270.0270.05714.76
5.3.260.0300.06714.86
5.3.250.0230.04714.71
5.3.240.0270.07014.77
5.3.230.0130.05014.74
5.3.220.0200.04314.68
5.3.210.0230.05714.71
5.3.200.0300.06714.92
5.3.190.0170.06314.78
5.3.180.0200.05014.71
5.3.170.0130.07714.85
5.3.160.0130.05314.69
5.3.150.0070.05314.78
5.3.140.0100.05714.70
5.3.130.0030.07714.66
5.3.120.0070.06314.77
5.3.110.0130.07014.69
5.3.100.0070.07314.21
5.3.90.0030.07714.21
5.3.80.0070.07314.21
5.3.70.0130.07014.21
5.3.60.0070.06014.21
5.3.50.0070.07314.21
5.3.40.0130.04014.21
5.3.30.0200.06314.26
5.3.20.0130.06714.21
5.3.10.0230.06314.21
5.3.00.0300.07014.21
5.2.170.0070.06014.21
5.2.160.0070.06014.21
5.2.150.0070.03714.21
5.2.140.0030.04714.21
5.2.130.0230.05014.21
5.2.120.0100.06014.21
5.2.110.0230.05714.21
5.2.100.0230.05314.21
5.2.90.0170.05314.21
5.2.80.0270.05014.21
5.2.70.0200.06014.21
5.2.60.0170.05014.21
5.2.50.0200.05314.21
5.2.40.0030.05314.21
5.2.30.0070.03714.21
5.2.20.0170.03314.21
5.2.10.0130.03014.21
5.2.00.0270.05714.21
5.1.60.0170.04014.21
5.1.50.0100.05714.21
5.1.40.0200.04714.21
5.1.30.0130.05714.21
5.1.20.0100.03714.21
5.1.10.0130.05314.21
5.1.00.0230.04714.21
5.0.50.0070.03314.21
5.0.40.0000.04314.21
5.0.30.0070.06014.21
5.0.20.0030.04314.21
5.0.10.0030.04314.21
5.0.00.0070.06314.21
4.4.90.0070.03014.21
4.4.80.0000.04014.21
4.4.70.0070.03314.21
4.4.60.0070.03014.21
4.4.50.0000.02014.21
4.4.40.0130.03014.21
4.4.30.0100.03314.21
4.4.20.0030.01714.21
4.4.10.0030.03314.21
4.4.00.0000.05714.21
4.3.110.0170.02714.21
4.3.100.0030.01714.21
4.3.90.0000.03714.21
4.3.80.0030.04014.21
4.3.70.0030.03714.21
4.3.60.0030.03314.21
4.3.50.0030.03314.21
4.3.40.0000.04314.21
4.3.30.0070.03314.21
4.3.20.0000.03314.21
4.3.10.0100.03014.21
4.3.00.0000.03014.21

preferences:
41.93 ms | 401 KiB | 5 Q