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.40.0110.00418.84
8.3.30.0080.00819.23
8.3.20.0080.00020.29
8.3.10.0050.00322.09
8.3.00.0040.00422.57
8.2.170.0130.00718.91
8.2.160.0070.01420.82
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0080.00019.61
8.2.110.0030.00620.63
8.2.100.0100.00317.91
8.2.90.0060.00617.88
8.2.80.0000.00819.16
8.2.70.0000.00818.05
8.2.60.0040.00417.75
8.2.50.0030.00617.93
8.2.40.0030.00619.35
8.2.30.0030.00618.09
8.2.20.0080.00017.78
8.2.10.0000.00818.01
8.2.00.0000.00717.87
8.1.270.0030.00522.27
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0090.00024.02
8.1.230.0110.00019.14
8.1.220.0000.00817.79
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0030.00517.22
8.1.180.0080.00018.10
8.1.170.0040.00417.62
8.1.160.0040.00422.09
8.1.150.0040.00418.66
8.1.140.0040.00417.49
8.1.130.0070.00017.93
8.1.120.0040.00417.62
8.1.110.0040.00417.46
8.1.100.0050.00217.57
8.1.90.0050.00217.50
8.1.80.0070.00017.52
8.1.70.0030.00517.45
8.1.60.0050.00317.58
8.1.50.0000.00717.49
8.1.40.0000.00717.62
8.1.30.0000.00817.67
8.1.20.0050.00317.70
8.1.10.0000.00717.64
8.1.00.0040.00417.53
8.0.300.0040.00419.73
8.0.290.0060.00316.75
8.0.280.0030.00318.53
8.0.270.0030.00317.35
8.0.260.0030.00516.97
8.0.250.0030.00516.96
8.0.240.0030.00317.13
8.0.230.0000.00717.11
8.0.220.0070.00017.09
8.0.210.0000.00716.88
8.0.200.0070.00417.06
8.0.190.0000.00717.17
8.0.180.0040.00416.95
8.0.170.0000.00917.05
8.0.160.0000.00716.97
8.0.150.0050.00316.96
8.0.140.0040.00417.06
8.0.130.0030.00613.48
8.0.120.0040.00416.93
8.0.110.0000.00716.98
8.0.100.0050.00317.05
8.0.90.0050.00217.06
8.0.80.0070.00717.05
8.0.70.0000.00717.16
8.0.60.0040.00416.88
8.0.50.0000.00717.05
8.0.30.0150.00416.99
8.0.20.0050.01517.40
8.0.10.0070.00017.07
8.0.00.0110.00816.91
7.4.330.0000.00515.28
7.4.320.0000.00716.48
7.4.300.0070.00016.64
7.4.290.0040.00416.71
7.4.280.0030.00316.52
7.4.270.0000.00716.64
7.4.260.0040.00416.57
7.4.250.0070.00016.59
7.4.240.0060.00216.69
7.4.230.0000.00716.57
7.4.220.0180.00916.80
7.4.210.0070.00916.75
7.4.200.0040.00416.48
7.4.190.0080.00016.63
7.4.160.0120.00616.60
7.4.150.0110.00717.40
7.4.140.0100.01117.86
7.4.130.0120.00816.61
7.4.120.0140.00316.62
7.4.110.0060.01316.51
7.4.100.0170.00916.50
7.4.90.0070.01016.46
7.4.80.0090.01019.39
7.4.70.0130.00316.64
7.4.60.0070.01016.68
7.4.50.0040.00016.64
7.4.40.0100.00622.77
7.4.30.0120.00316.61
7.4.10.0040.01114.88
7.4.00.0080.01115.01
7.3.330.0030.00313.31
7.3.320.0030.00213.38
7.3.310.0030.00316.40
7.3.300.0040.00416.50
7.3.290.0090.00616.45
7.3.280.0110.00916.40
7.3.270.0140.00317.40
7.3.260.0110.01116.52
7.3.250.0100.00916.58
7.3.240.0090.01216.75
7.3.230.0090.00916.55
7.3.210.0070.01116.76
7.3.200.0110.01119.39
7.3.190.0100.01616.65
7.3.180.0090.00616.54
7.3.170.0110.00516.37
7.3.160.0040.01216.36
7.3.130.0130.00314.86
7.3.120.0080.01014.88
7.3.110.0030.01314.77
7.3.100.0060.00714.72
7.3.90.0070.00814.91
7.3.80.0030.00614.80
7.3.70.0070.00514.83
7.3.60.0090.00614.84
7.3.50.0100.00314.75
7.3.40.0060.00814.84
7.3.30.0040.01014.83
7.3.20.0050.00816.79
7.3.10.0040.01116.60
7.3.00.0040.00716.58
7.2.330.0200.00016.70
7.2.320.0090.01416.77
7.2.310.0030.01316.45
7.2.300.0130.01016.79
7.2.290.0040.01716.66
7.2.260.0000.01515.07
7.2.250.0120.00815.00
7.2.240.0050.01115.00
7.2.230.0080.00514.79
7.2.220.0090.00715.00
7.2.210.0060.00915.17
7.2.200.0080.00615.17
7.2.190.0070.00614.90
7.2.180.0050.01115.00
7.2.170.0050.00515.07
7.2.160.0040.01115.05
7.2.150.0080.00616.63
7.2.140.0030.00716.98
7.2.130.0030.01016.62
7.2.120.0030.00617.03
7.2.110.0090.00616.66
7.2.100.0030.01016.55
7.2.90.0100.00316.97
7.2.80.0000.01416.89
7.2.70.0100.00616.84
7.2.60.0030.01016.92
7.2.50.0040.01216.84
7.2.40.0060.00616.97
7.2.30.0090.00616.83
7.2.20.0080.00916.96
7.2.10.0060.00916.93
7.2.00.0120.00017.00
7.1.330.0050.01015.78
7.1.320.0050.00915.71
7.1.310.0040.00915.89
7.1.300.0030.00915.54
7.1.290.0040.00815.85
7.1.280.0030.00615.72
7.1.270.0080.00615.74
7.1.260.0050.00715.88
7.1.250.0040.01115.61
7.1.240.0080.00015.84
7.1.230.0030.00915.91
7.1.220.0060.00915.80
7.1.210.0030.00915.90
7.1.200.0070.00715.84
7.1.190.0120.00415.64
7.1.180.0030.01015.63
7.1.170.0070.00715.88
7.1.160.0060.00615.69
7.1.150.0000.01216.00
7.1.140.0090.00615.82
7.1.130.0000.01415.60
7.1.120.0000.01315.53
7.1.110.0110.00415.85
7.1.100.0070.00715.88
7.1.90.0030.00915.95
7.1.80.0060.01216.04
7.1.70.0100.00216.54
7.1.60.0040.00716.46
7.1.50.0100.00516.27
7.1.40.0000.01015.52
7.1.30.0080.00415.91
7.1.20.0000.01115.65
7.1.10.0030.00715.45
7.1.00.0040.04419.04
7.0.330.0050.00515.24
7.0.320.0000.00815.56
7.0.310.0060.00615.28
7.0.300.0070.00715.34
7.0.290.0070.00315.50
7.0.280.0030.00615.54
7.0.270.0040.00415.42
7.0.260.0070.00715.50
7.0.250.0000.00915.27
7.0.240.0030.00715.29
7.0.230.0040.00715.63
7.0.220.0030.00615.41
7.0.210.0090.00615.50
7.0.200.0050.00916.07
7.0.190.0000.01115.31
7.0.180.0110.00315.33
7.0.170.0050.00515.37
7.0.160.0040.00815.45
7.0.150.0060.00315.45
7.0.140.0030.04118.76
7.0.130.0090.00315.50
7.0.120.0030.00715.32
7.0.110.0100.00715.48
7.0.100.0050.03417.68
7.0.90.0020.03317.58
7.0.80.0030.02517.68
7.0.70.0030.02317.48
7.0.60.0060.01917.68
7.0.50.0080.02517.89
7.0.40.0050.02416.60
7.0.30.0050.02716.83
7.0.20.0070.04216.79
7.0.10.0030.02316.81
7.0.00.0050.02216.81
5.6.400.0030.01014.37
5.6.390.0060.01114.34
5.6.380.0040.00414.04
5.6.370.0000.01314.14
5.6.360.0090.00614.49
5.6.350.0030.00914.08
5.6.340.0090.00614.61
5.6.330.0070.00714.48
5.6.320.0030.01014.45
5.6.310.0070.00714.45
5.6.300.0030.01014.52
5.6.290.0060.00314.40
5.6.280.0000.01414.56
5.6.270.0030.01614.04
5.6.260.0070.00714.35
5.6.250.0080.04117.37
5.6.240.0100.04017.38
5.6.230.0050.02717.53
5.6.220.0050.02517.49
5.6.210.0000.02617.48
5.6.200.0040.03217.78
5.6.190.0030.02517.58
5.6.180.0070.04417.62
5.6.170.0020.02917.65
5.6.160.0070.02217.62
5.6.150.0030.02517.77
5.6.140.0050.02517.65
5.6.130.0100.02017.84
5.6.120.0080.02017.61
5.6.110.0040.02517.73
5.6.100.0030.02317.54
5.6.90.0090.02517.64
5.6.80.0050.02417.37
5.6.70.0040.02217.16
5.6.60.0060.02317.24
5.6.50.0010.02817.28
5.6.40.0050.02617.25
5.6.30.0050.02317.44
5.6.20.0020.04717.18
5.6.10.0080.04017.39
5.6.00.0080.04317.36
5.5.380.0100.04217.44
5.5.370.0020.02817.62
5.5.360.0040.02617.33
5.5.350.0050.02917.32
5.5.340.0060.02017.44
5.5.330.0050.03617.60
5.5.320.0030.03517.63
5.5.310.0070.02517.67
5.5.300.0020.02917.74
5.5.290.0070.02217.69
5.5.280.0060.03017.65
5.5.270.0060.02417.60
5.5.260.0050.02917.62
5.5.250.0070.02417.56
5.5.240.0060.02117.14
5.5.230.0060.02517.18
5.5.220.0070.02217.23
5.5.210.0050.03017.24
5.5.200.0080.03017.12
5.5.190.0060.02117.11
5.5.180.0030.02317.22
5.5.170.0140.00014.43
5.5.160.0070.04317.26
5.5.150.0030.03317.18
5.5.140.0120.03717.12
5.5.130.0050.04317.32
5.5.120.0050.04317.14
5.5.110.0070.04017.28
5.5.100.0080.04717.22
5.5.90.0050.04317.15
5.5.80.0090.03817.04
5.5.70.0050.03517.08
5.5.60.0130.03617.07
5.5.50.0080.04017.15
5.5.40.0070.04017.18
5.5.30.0080.03817.21
5.5.20.0030.04417.10
5.5.10.0050.04717.05
5.5.00.0060.04617.14
5.4.450.0030.02515.32
5.4.440.0050.02015.23
5.4.430.0010.02115.33
5.4.420.0050.02715.11
5.4.410.0080.03315.22
5.4.400.0020.02214.91
5.4.390.0030.02015.11
5.4.380.0030.02315.06
5.4.370.0050.02115.16
5.4.360.0010.02615.20
5.4.350.0050.02214.95
5.4.340.0060.03314.97
5.4.330.0040.00411.10
5.4.320.0070.04015.12
5.4.310.0060.04015.10
5.4.300.0100.02615.11
5.4.290.0050.03715.05
5.4.280.0030.04315.04
5.4.270.0080.04015.22
5.4.260.0050.03815.12
5.4.250.0100.02115.19
5.4.240.0070.02715.14
5.4.230.0080.03915.04
5.4.220.0060.02815.09
5.4.210.0100.03515.01
5.4.200.0050.04014.92
5.4.190.0070.04015.02
5.4.180.0030.04215.06
5.4.170.0050.04515.12
5.4.160.0100.03514.95
5.4.150.0020.04315.20
5.4.140.0030.03913.72
5.4.130.0060.03313.73
5.4.120.0050.03013.79
5.4.110.0050.02713.80
5.4.100.0050.02213.81
5.4.90.0090.03713.84
5.4.80.0050.03813.81
5.4.70.0100.03413.83
5.4.60.0070.04013.86
5.4.50.0060.03313.67
5.4.40.0050.02313.79
5.4.30.0020.04513.71
5.4.20.0050.03813.86
5.4.10.0050.04213.81
5.4.00.0100.03513.52
5.3.290.0080.03312.81
5.3.280.0030.04012.72
5.3.270.0050.04112.69
5.3.260.0090.03712.55
5.3.250.0060.03812.69
5.3.240.0020.02612.65
5.3.230.0030.04312.68
5.3.220.0030.03512.60
5.3.210.0050.03712.43
5.3.200.0060.02112.54
5.3.190.0070.04012.67
5.3.180.0030.03412.70
5.3.170.0030.04412.74
5.3.160.0000.03012.79
5.3.150.0080.03812.72
5.3.140.0100.03512.47
5.3.130.0050.03812.71
5.3.120.0030.03912.50
5.3.110.0080.03612.62
5.3.100.0050.03812.36
5.3.90.0050.03212.38
5.3.80.0080.01912.37
5.3.70.0070.03912.30
5.3.60.0020.03912.22
5.3.50.0030.03012.31
5.3.40.0100.03312.30
5.3.30.0030.03912.18
5.3.20.0060.03012.20
5.3.10.0050.03312.02
5.3.00.0020.03912.01
5.2.170.0000.06711.40
5.2.160.0070.05711.30
5.2.150.0130.05311.17
5.2.140.0030.04711.30
5.2.130.0070.06011.44
5.2.120.0100.05711.36
5.2.110.0070.03011.36
5.2.100.0030.03011.26
5.2.90.0070.04711.36
5.2.80.0030.03311.23
5.2.70.0130.05311.36
5.2.60.0070.04311.29
5.2.50.0070.05711.13
5.2.40.0130.05011.14
5.2.30.0030.05311.19
5.2.20.0070.05711.21
5.2.10.0070.05711.13
5.2.00.0100.05010.98
5.1.60.0070.05310.25
5.1.50.0070.05010.28
5.1.40.0000.05310.14
5.1.30.0100.03310.59
5.1.20.0100.04710.46
5.1.10.0130.04710.26
5.1.00.0030.06010.12
5.0.50.0070.0408.63
5.0.40.0030.0378.66
5.0.30.0030.0638.39
5.0.20.0000.0378.49
5.0.10.0030.0278.28
5.0.00.0000.0778.47
4.4.90.0030.0307.46
4.4.80.0070.0307.46
4.4.70.0000.0377.46
4.4.60.0000.0337.46
4.4.50.0030.0307.46
4.4.40.0000.0407.46
4.4.30.0030.0377.46
4.4.20.0000.0207.46
4.4.10.0030.0307.46
4.4.00.0030.0507.46
4.3.110.0070.0237.46
4.3.100.0030.0307.46
4.3.90.0070.0277.46
4.3.80.0000.0437.46
4.3.70.0030.0377.46
4.3.60.0000.0337.46
4.3.50.0070.0137.46
4.3.40.0000.0337.46
4.3.30.0000.0377.46
4.3.20.0000.0377.46
4.3.10.0000.0307.46
4.3.00.0030.0337.46

preferences:
63.71 ms | 400 KiB | 5 Q