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

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.0110.01118.23
8.3.50.0110.00922.10
8.3.40.0040.01119.02
8.3.30.0000.01419.25
8.3.20.0030.00520.29
8.3.10.0050.00322.07
8.3.00.0040.00422.40
8.2.180.0070.01116.88
8.2.170.0070.00722.96
8.2.160.0070.00720.90
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0030.00619.38
8.2.110.0050.00522.22
8.2.100.0080.00317.97
8.2.90.0040.00419.17
8.2.80.0090.00018.05
8.2.70.0080.00017.75
8.2.60.0040.00417.93
8.2.50.0000.00818.07
8.2.40.0040.00418.34
8.2.30.0030.00518.22
8.2.20.0060.00317.86
8.2.10.0040.00417.77
8.2.00.0030.00617.94
8.1.280.0100.00725.92
8.1.270.0040.00422.25
8.1.260.0030.00526.35
8.1.250.0080.00028.09
8.1.240.0090.00023.97
8.1.230.0070.00319.17
8.1.220.0000.00817.77
8.1.210.0060.00318.77
8.1.200.0030.00717.35
8.1.190.0040.00417.28
8.1.180.0050.00318.10
8.1.170.0050.00318.53
8.1.160.0040.00422.04
8.1.150.0000.00818.70
8.1.140.0040.00417.45
8.1.130.0030.00317.92
8.1.120.0000.00817.60
8.1.110.0000.00717.59
8.1.100.0040.00417.54
8.1.90.0050.00317.47
8.1.80.0040.00417.39
8.1.70.0030.00317.43
8.1.60.0030.00617.69
8.1.50.0000.00817.52
8.1.40.0000.00817.48
8.1.30.0050.00217.70
8.1.20.0030.00617.67
8.1.10.0040.00417.59
8.1.00.0000.00717.38
8.0.300.0030.00618.77
8.0.290.0000.00717.17
8.0.280.0070.00018.54
8.0.270.0030.00317.34
8.0.260.0030.00316.92
8.0.250.0000.00717.14
8.0.240.0040.00417.09
8.0.230.0040.00417.11
8.0.220.0030.00317.08
8.0.210.0000.00816.94
8.0.200.0060.00316.97
8.0.190.0070.00017.00
8.0.180.0000.00716.96
8.0.170.0040.00417.00
8.0.160.0000.00717.12
8.0.150.0000.00717.00
8.0.140.0070.00017.00
8.0.130.0060.00313.47
8.0.120.0000.00717.01
8.0.110.0020.00517.04
8.0.100.0070.00016.98
8.0.90.0040.00416.84
8.0.80.0070.00717.01
8.0.70.0040.00417.04
8.0.60.0000.00717.07
8.0.50.0000.00916.93
8.0.30.0100.01217.05
8.0.20.0070.01117.42
8.0.10.0070.00017.23
8.0.00.0080.01016.74
7.4.330.0000.00515.06
7.4.320.0000.00616.70
7.4.300.0000.00716.71
7.4.290.0000.00716.67
7.4.280.0070.00016.56
7.4.270.0050.00316.60
7.4.260.0030.00316.55
7.4.250.0040.00416.70
7.4.240.0030.00516.62
7.4.230.0000.00816.67
7.4.220.0070.01116.61
7.4.210.0080.00616.65
7.4.200.0040.00416.57
7.4.190.0000.00716.73
7.4.160.0090.00616.59
7.4.150.0120.00617.40
7.4.140.0090.01217.86
7.4.130.0110.00916.69
7.4.120.0160.00216.71
7.4.110.0090.00916.70
7.4.100.0120.00616.66
7.4.90.0030.01416.78
7.4.80.0110.01119.39
7.4.70.0130.00316.62
7.4.60.0070.01016.58
7.4.50.0020.00216.69
7.4.40.0090.00622.77
7.4.30.0130.00316.50
7.4.00.0000.01815.26
7.3.330.0000.00513.46
7.3.320.0030.00313.28
7.3.310.0020.00516.52
7.3.300.0030.00316.45
7.3.290.0090.00616.45
7.3.280.0100.00816.46
7.3.270.0060.01017.40
7.3.260.0100.00716.36
7.3.250.0100.00716.53
7.3.240.0120.00616.36
7.3.230.0120.00616.55
7.3.210.0090.00616.71
7.3.200.0030.01519.39
7.3.190.0070.01116.52
7.3.180.0100.00616.59
7.3.170.0120.00816.69
7.3.160.0100.00616.63
7.3.120.0040.01115.14
7.3.10.0210.00716.75
7.3.00.0060.01816.59
7.2.330.0090.00916.77
7.2.320.0030.01916.43
7.2.310.0090.01416.88
7.2.300.0140.00716.52
7.2.290.0140.00416.53
7.2.130.0210.00416.54
7.2.120.0160.00616.69
7.2.110.0100.01016.48
7.2.100.0120.00916.63
7.2.90.0170.00616.66
7.2.80.0100.01716.70
7.2.70.0150.01116.75
7.2.60.0160.00816.91
7.2.50.0140.01216.70
7.2.40.0280.00017.01
7.2.30.0210.00816.38
7.2.20.0250.00016.74
7.2.10.0080.01216.43
7.2.00.0100.01316.60
7.1.250.0110.00915.53
7.1.70.0070.00016.93
7.1.60.0100.01419.82
7.1.50.0300.00334.78
7.1.00.0030.07722.35
7.0.200.0070.00716.88
7.0.140.0070.07322.15
7.0.110.0130.08019.98
7.0.100.0070.07320.09
7.0.90.0030.07719.96
7.0.80.0130.07720.08
7.0.70.0170.05319.95
7.0.60.0070.07720.03
7.0.50.0030.08020.08
7.0.40.0070.08319.66
7.0.30.0070.04319.59
7.0.20.0070.04319.71
7.0.10.0130.06319.74
7.0.00.0030.08719.88
5.6.280.0030.07321.05
5.6.260.0030.04020.60
5.6.250.0070.06320.59
5.6.240.0100.07720.86
5.6.230.0100.04020.56
5.6.220.0070.05020.65
5.6.210.0000.08320.59
5.6.200.0030.05720.85
5.6.190.0070.07720.55
5.6.180.0130.04020.67
5.6.170.0130.05720.70
5.6.160.0000.06320.59
5.6.150.0100.07320.58
5.6.140.0170.05320.62
5.6.130.0130.07720.57
5.6.120.0170.07320.63
5.6.110.0070.04020.63
5.6.100.0000.04720.46
5.6.90.0030.06320.46
5.6.80.0070.07720.00
5.6.70.0100.05720.00
5.6.60.0070.07319.85
5.6.50.0100.07720.06
5.6.40.0070.07020.01
5.6.30.0000.05019.98
5.6.20.0130.04020.05
5.6.10.0130.03719.98
5.6.00.0070.08020.05
5.5.380.0100.06017.70
5.5.370.0200.02717.70
5.5.360.0130.08017.68
5.5.350.0070.04317.27
5.5.340.0100.08018.25
5.5.330.0070.04018.12
5.5.320.0030.06318.10
5.5.310.0130.05318.12
5.5.300.0130.03718.27
5.5.290.0030.05018.23
5.5.280.0030.07717.91
5.5.270.0070.06018.22
5.5.260.0170.06317.91
5.5.250.0030.08717.91
5.5.240.0130.06317.30
5.5.230.0030.07017.43
5.5.220.0030.07317.30
5.5.210.0100.07017.30
5.5.200.0070.03717.49
5.5.190.0130.06717.47
5.5.180.0130.07317.50
5.5.160.0000.05317.49
5.5.150.0070.05717.45
5.5.140.0030.08017.57
5.5.130.0170.03317.30
5.5.120.0100.07717.26
5.5.110.0130.03717.62
5.5.100.0070.03717.19
5.5.90.0030.03317.37
5.5.80.0030.07317.38
5.5.70.0030.07717.15
5.5.60.0070.03017.33
5.5.50.0100.06717.16
5.5.40.0000.07317.20
5.5.30.0000.04017.13
5.5.20.0070.07017.36
5.5.10.0030.05317.47
5.5.00.0130.06317.16
5.4.450.0030.06319.56
5.4.440.0000.05019.45
5.4.430.0130.04019.55
5.4.420.0130.03719.55
5.4.410.0070.07719.42
5.4.400.0000.08019.03
5.4.390.0100.04319.10
5.4.380.0030.04019.05
5.4.370.0100.05019.01
5.4.360.0100.05019.09
5.4.350.0000.08319.07
5.4.340.0030.08019.24
5.4.320.0130.06719.24
5.4.310.0070.05019.15
5.4.300.0070.07319.29
5.4.290.0070.07719.21
5.4.280.0000.08319.21
5.4.270.0170.05319.20
5.4.260.0070.04019.21
5.4.250.0070.06019.29
5.4.240.0070.07319.31
5.4.230.0030.06719.15
5.4.220.0030.07719.16
5.4.210.0000.06319.16
5.4.200.0030.06319.05
5.4.190.0170.06319.01
5.4.180.0070.03019.28
5.4.170.0130.06319.29
5.4.160.0070.04718.98
5.4.150.0070.03718.98
5.4.140.0070.06016.45
5.4.130.0070.07016.38
5.4.120.0130.05716.55
5.4.110.0030.06716.31
5.4.100.0070.04016.42
5.4.90.0100.05716.57
5.4.80.0030.07016.45
5.4.70.0070.06016.30
5.4.60.0070.04716.54
5.4.50.0100.07016.45
5.4.40.0070.03716.48
5.4.30.0100.07016.63
5.4.20.0100.05716.50
5.4.10.0000.04716.45
5.4.00.0030.05315.97
5.3.290.0030.05314.66
5.3.280.0100.06714.60
5.3.270.0070.05314.61
5.3.260.0070.07314.73
5.3.250.0070.07014.82
5.3.240.0030.05314.63
5.3.230.0070.06314.63
5.3.220.0030.07714.62
5.3.210.0100.03714.68
5.3.200.0130.07014.57
5.3.190.0030.08014.72
5.3.180.0030.07014.63
5.3.170.0130.07014.67
5.3.160.0130.05314.59
5.3.150.0100.03314.70
5.3.140.0130.07014.77
5.3.130.0130.07014.61
5.3.120.0030.04714.58
5.3.110.0070.07314.70
5.3.100.0000.06014.21
5.3.90.0000.04714.09
5.3.80.0070.03714.03
5.3.70.0000.06014.25
5.3.60.0000.07714.03
5.3.50.0030.04713.91
5.3.40.0070.04013.98
5.3.30.0100.06713.92
5.3.20.0030.05713.93
5.3.10.0070.07013.65
5.3.00.0030.08013.65
5.2.170.0100.05011.96
5.2.160.0070.06011.96
5.2.150.0030.03011.96
5.2.140.0000.06311.96
5.2.130.0070.03311.96
5.2.120.0070.02711.96
5.2.110.0070.03011.96
5.2.100.0000.03711.96
5.2.90.0030.06011.96
5.2.80.0000.04711.96
5.2.70.0030.03311.96
5.2.60.0000.06011.96
5.2.50.0100.04011.96
5.2.40.0030.04311.96
5.2.30.0030.03011.96
5.2.20.0030.05711.96
5.2.10.0030.04711.96
5.2.00.0100.05311.96
5.1.60.0070.04311.96
5.1.50.0000.05011.96
5.1.40.0100.04011.96
5.1.30.0000.06011.96
5.1.20.0000.05711.96
5.1.10.0170.04011.96
5.1.00.0070.05311.96
5.0.50.0030.03011.96
5.0.40.0000.02311.96
5.0.30.0100.05011.96
5.0.20.0000.04311.96
5.0.10.0030.04711.96
5.0.00.0000.03711.96
4.4.90.0030.03311.96
4.4.80.0000.03311.96
4.4.70.0000.03711.96
4.4.60.0030.03311.96
4.4.50.0030.03011.96
4.4.40.0030.03311.96
4.4.30.0000.03711.96
4.4.20.0030.01711.96
4.4.10.0000.02711.96
4.4.00.0030.05011.96
4.3.110.0030.02711.96
4.3.100.0030.03311.96
4.3.90.0030.03011.96
4.3.80.0070.05011.96
4.3.70.0030.03711.96
4.3.60.0070.03011.96
4.3.50.0030.02011.96
4.3.40.0000.03011.96
4.3.30.0000.02011.96
4.3.20.0070.02711.96
4.3.10.0000.03011.96
4.3.00.0030.03011.96

preferences:
43.51 ms | 401 KiB | 5 Q