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)) . ' 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.0100.01021.95
8.3.40.0140.00418.95
8.3.30.0110.00419.05
8.3.20.0040.00420.16
8.3.10.0040.00422.14
8.3.00.0080.00022.39
8.2.180.0140.00716.75
8.2.170.0120.00322.96
8.2.160.0140.00720.94
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00417.75
8.2.110.0060.00322.24
8.2.100.0090.00317.84
8.2.90.0000.00819.30
8.2.80.0080.00017.97
8.2.70.0040.00417.75
8.2.60.0040.00418.05
8.2.50.0040.00418.07
8.2.40.0000.00818.15
8.2.30.0000.00818.16
8.2.20.0000.00717.83
8.2.10.0050.00217.81
8.2.00.0080.00017.84
8.1.280.0110.00425.92
8.1.270.0000.00822.19
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0030.00622.59
8.1.230.0090.00320.89
8.1.220.0040.00417.79
8.1.210.0050.00318.77
8.1.200.0070.00317.35
8.1.190.0030.00517.27
8.1.180.0040.00418.10
8.1.170.0040.00418.59
8.1.160.0040.00422.09
8.1.150.0020.00518.67
8.1.140.0000.00717.45
8.1.130.0030.00317.76
8.1.120.0000.00717.52
8.1.110.0000.00717.50
8.1.100.0030.00617.53
8.1.90.0040.00417.36
8.1.80.0040.00417.44
8.1.70.0000.00717.46
8.1.60.0030.00517.50
8.1.50.0000.00717.53
8.1.40.0000.00717.52
8.1.30.0050.00317.67
8.1.20.0080.00017.69
8.1.10.0050.00217.53
8.1.00.0020.00517.45
8.0.300.0040.00418.77
8.0.290.0040.00417.18
8.0.280.0040.00418.46
8.0.270.0070.00017.30
8.0.260.0000.00816.91
8.0.250.0070.00017.01
8.0.240.0080.00017.02
8.0.230.0030.00316.95
8.0.220.0030.00316.90
8.0.210.0040.00416.99
8.0.200.0030.00617.09
8.0.190.0050.00216.92
8.0.180.0070.00016.89
8.0.170.0050.00317.05
8.0.160.0040.00416.98
8.0.150.0050.00316.91
8.0.140.0040.00416.91
8.0.130.0060.00313.38
8.0.120.0040.00416.84
8.0.110.0050.00216.98
8.0.100.0070.00016.92
8.0.90.0000.00717.02
8.0.80.0060.00917.03
8.0.70.0040.00416.84
8.0.60.0070.00016.88
8.0.50.0000.00716.98
8.0.30.0110.00917.28
8.0.20.0090.01017.42
8.0.10.0000.00717.17
8.0.00.0110.00716.90
7.4.330.0000.00615.00
7.4.320.0000.00616.59
7.4.300.0000.00616.65
7.4.290.0030.00316.61
7.4.280.0070.00016.54
7.4.270.0030.00316.62
7.4.260.0000.00716.66
7.4.250.0030.00516.39
7.4.240.0000.00816.63
7.4.230.0040.00416.71
7.4.220.0130.01216.66
7.4.210.0040.01016.58
7.4.200.0070.00016.42
7.4.190.0030.00316.43
7.4.160.0100.01016.54
7.4.150.0150.00617.40
7.4.140.0160.00617.86
7.4.130.0150.00616.60
7.4.120.0110.00616.51
7.4.110.0070.01116.52
7.4.100.0070.01016.69
7.4.90.0000.01716.71
7.4.80.0120.00619.39
7.4.70.0080.00816.68
7.4.60.0060.01016.59
7.4.50.0050.00216.24
7.4.40.0030.01022.77
7.4.30.0060.00916.57
7.4.10.0070.01015.19
7.4.00.0040.01315.03
7.3.330.0000.00513.51
7.3.320.0050.00013.52
7.3.310.0070.00016.33
7.3.300.0070.00016.38
7.3.290.0120.00316.53
7.3.280.0050.01316.44
7.3.270.0070.01117.40
7.3.260.0060.01216.55
7.3.250.0120.00616.82
7.3.240.0120.00616.71
7.3.230.0130.00616.68
7.3.210.0080.00816.81
7.3.200.0100.01319.39
7.3.190.0140.00716.69
7.3.180.0060.00916.85
7.3.170.0040.01216.74
7.3.160.0040.01216.45
7.3.130.0060.01314.68
7.3.120.0080.00914.90
7.3.110.0090.00914.70
7.3.100.0090.00714.84
7.3.90.0060.00914.69
7.3.80.0020.00914.89
7.3.70.0050.01014.96
7.3.60.0050.00614.87
7.3.50.0040.00814.89
7.3.40.0030.01214.88
7.3.30.0030.00814.68
7.3.20.0050.00916.77
7.3.10.0040.00716.86
7.3.00.0060.00616.75
7.2.330.0100.00716.96
7.2.320.0120.00616.84
7.2.310.0130.00716.85
7.2.300.0080.00816.64
7.2.290.0120.00916.89
7.2.260.0130.00315.21
7.2.250.0040.01315.09
7.2.240.0090.00915.06
7.2.230.0050.01015.13
7.2.220.0080.00315.12
7.2.210.0050.01115.06
7.2.200.0060.00814.84
7.2.190.0090.00615.16
7.2.180.0070.00915.17
7.2.170.0020.01415.08
7.2.160.0000.01615.17
7.2.150.0030.01316.76
7.2.140.0030.00916.99
7.2.130.0080.00516.97
7.2.120.0090.00516.75
7.2.110.0030.00816.87
7.2.100.0080.00316.93
7.2.90.0090.00416.86
7.2.80.0050.00716.96
7.2.70.0060.01116.85
7.2.60.0040.01117.08
7.2.50.0050.01017.01
7.2.40.0080.00416.87
7.2.30.0060.00917.07
7.2.20.0080.00317.08
7.2.10.0110.00416.80
7.2.00.0070.00517.01
7.1.330.0050.00915.80
7.1.320.0060.00515.91
7.1.310.0060.00815.87
7.1.300.0070.01015.93
7.1.290.0050.00815.87
7.1.280.0050.01015.85
7.1.270.0060.00615.79
7.1.260.0030.01015.73
7.1.250.0050.00815.81
7.1.240.0060.00615.91
7.1.230.0060.00915.70
7.1.220.0080.00515.83
7.1.210.0040.01116.09
7.1.200.0060.00315.87
7.1.190.0000.00915.96
7.1.180.0100.00615.83
7.1.170.0040.00716.02
7.1.160.0130.00016.11
7.1.150.0000.01315.93
7.1.140.0000.00915.70
7.1.130.0040.01115.89
7.1.120.0060.01215.71
7.1.110.0000.00915.85
7.1.100.0030.00615.87
7.1.90.0000.00916.10
7.1.80.0070.00715.91
7.1.70.0050.00716.43
7.1.60.0030.01217.89
7.1.50.0070.01025.37
7.1.40.0060.01016.02
7.1.30.0030.01415.95
7.1.20.0060.00615.87
7.1.10.0130.00015.82
7.1.00.0040.04219.23
7.0.330.0070.00315.54
7.0.320.0050.00515.28
7.0.310.0030.00915.38
7.0.300.0040.00815.41
7.0.290.0080.00415.49
7.0.280.0040.00815.66
7.0.270.0030.01015.47
7.0.260.0140.00015.52
7.0.250.0070.00715.54
7.0.240.0070.00715.71
7.0.230.0040.00815.55
7.0.220.0000.01215.72
7.0.210.0000.01215.34
7.0.200.0060.00516.23
7.0.190.0070.00715.36
7.0.180.0060.00915.57
7.0.170.0110.00615.38
7.0.160.0100.00315.32
7.0.150.0060.00315.52
7.0.140.0050.04018.92
7.0.130.0050.00815.55
7.0.120.0000.01115.70
7.0.110.0090.00315.61
7.0.100.0020.01215.39
7.0.90.0090.00615.59
7.0.80.0100.00715.57
7.0.70.0070.00415.68
7.0.60.0070.03417.87
7.0.50.0070.02216.89
7.0.40.0080.04516.86
7.0.30.0150.04617.02
7.0.20.0200.02817.08
7.0.10.0160.03916.92
7.0.00.0060.03116.92
5.6.400.0040.01414.33
5.6.390.0040.01214.61
5.6.380.0060.00314.58
5.6.370.0040.00814.15
5.6.360.0040.00814.53
5.6.350.0040.00714.68
5.6.340.0050.00314.31
5.6.330.0090.00914.38
5.6.320.0030.01014.43
5.6.310.0130.00014.80
5.6.300.0060.00614.35
5.6.290.0060.00614.41
5.6.280.0070.03817.76
5.6.270.0090.00314.58
5.6.260.0080.00614.49
5.6.250.0060.00314.58
5.6.240.0030.00914.61
5.6.230.0000.00914.47
5.6.220.0030.00914.33
5.6.210.0060.04017.58
5.6.200.0050.03616.34
5.6.190.0080.03017.41
5.6.180.2030.02517.67
5.6.170.0120.03417.52
5.6.160.0040.03117.50
5.6.150.0070.04216.42
5.6.140.0050.02216.35
5.6.130.0070.02716.40
5.6.120.0070.04317.84
5.6.110.0050.02517.84
5.6.100.0130.03717.80
5.6.90.0070.03817.80
5.6.80.0070.04617.61
5.6.70.0150.03417.43
5.6.60.0000.01614.65
5.6.50.0060.00614.23
5.6.40.0040.01114.25
5.6.30.0000.01114.67
5.6.20.0040.01114.42
5.6.10.0130.00314.51
5.6.00.0030.01014.37
5.5.380.0110.00414.51
5.5.370.0030.01014.22
5.5.360.0080.00414.11
5.5.350.0040.04217.45
5.5.340.0070.03716.28
5.5.330.0030.03317.54
5.5.320.0180.03717.35
5.5.310.0100.02217.40
5.5.300.0080.04116.26
5.5.290.0090.04116.36
5.5.280.0090.04617.72
5.5.270.0060.02317.59
5.5.260.0100.04217.79
5.5.250.0080.03317.52
5.5.240.0080.03817.38
5.5.230.0000.01314.25
5.5.220.0000.01414.11
5.5.210.0030.01014.19
5.5.200.0060.00814.30
5.5.190.0030.00614.14
5.5.180.0090.00914.01
5.5.170.0040.00714.31
5.5.160.0130.00314.45
5.5.150.0030.00814.25
5.5.140.0000.00814.13
5.5.130.0040.00814.18
5.5.120.0030.00914.10
5.5.110.0160.00014.67
5.5.100.0040.01214.00
5.5.90.0100.00314.39
5.5.80.0040.01114.20
5.5.70.0060.00914.46
5.5.60.0060.00314.18
5.5.50.0070.00714.30
5.5.40.0060.00914.59
5.5.30.0120.00314.09
5.5.20.0030.01514.26
5.5.10.0090.00314.48
5.5.00.0030.00914.07
5.4.450.0860.01715.49
5.4.440.0910.02915.53
5.4.430.0730.02515.59
5.4.420.0790.02015.45
5.4.410.0350.02115.47
5.4.400.0030.03015.34
5.4.390.0030.02515.34
5.4.380.0900.02515.29
5.4.370.0830.02615.34
5.4.360.0900.02015.40
5.4.350.0760.02415.24
5.4.340.0800.02315.41
5.4.330.0040.00911.47
5.4.320.0790.02215.42
5.4.310.0850.02315.36
5.4.300.0880.02915.42
5.4.290.0920.02515.22
5.4.280.0780.02415.37
5.4.270.0810.02115.33
5.4.260.0900.02815.27
5.4.250.0780.02015.35
5.4.240.0920.02215.29
5.4.230.0800.01815.37
5.4.220.0900.02515.23
5.4.210.0930.02215.34
5.4.200.0920.02515.32
5.4.190.0890.02415.37
5.4.180.0800.02015.40
5.4.170.0870.02615.32
5.4.160.0780.02015.39
5.4.150.0860.02515.39
5.4.140.0750.02314.16
5.4.130.0030.03714.08
5.4.120.0070.02914.02
5.4.110.0550.03114.01
5.4.100.0930.02113.96
5.4.90.0870.02213.96
5.4.80.0770.01914.09
5.4.70.0900.02714.09
5.4.60.0880.02314.04
5.4.50.0770.02114.13
5.4.40.0960.01913.94
5.4.30.0770.02214.03
5.4.20.0720.02913.96
5.4.10.0920.02514.09
5.4.00.0920.02513.80
5.3.290.0940.02813.12
5.3.280.1030.02013.08
5.3.270.0840.02013.18
5.3.260.0860.02013.15
5.3.250.0830.02113.18
5.3.240.0820.02113.22
5.3.230.0800.02313.17
5.3.220.0780.02213.09
5.3.210.0830.01813.09
5.3.200.0100.01713.08
5.3.190.0050.02313.10
5.3.180.0040.02313.09
5.3.170.0590.02213.08
5.3.160.0770.02113.09
5.3.150.0930.02713.07
5.3.140.0820.02013.13
5.3.130.0800.02213.10
5.3.120.0880.02513.15
5.3.110.0820.02113.06
5.3.100.0830.02312.80
5.3.90.0780.02312.85
5.3.80.0780.02212.82
5.3.70.0800.02012.82
5.3.60.0970.02312.76
5.3.50.0810.02112.79
5.3.40.0050.02012.74
5.3.30.0050.02412.76
5.3.20.0080.01712.63
5.3.10.0980.02412.58
5.3.00.1020.03312.58
5.2.170.1500.03311.26
5.2.160.1470.03711.33
5.2.150.1400.04711.34
5.2.140.1530.03311.34
5.2.130.1430.04311.20
5.2.120.1330.03311.26
5.2.110.1470.04011.48
5.2.100.1270.02711.25
5.2.90.1500.03011.16
5.2.80.1530.03711.38
5.2.70.1270.04711.28
5.2.60.1300.03311.11
5.2.50.1570.02711.12
5.2.40.1270.03311.22
5.2.30.1270.04011.16
5.2.20.1200.03711.24
5.2.10.1170.03311.08
5.2.00.1330.03010.92
5.1.60.1300.03010.18
5.1.50.1130.03010.37
5.1.40.1170.03310.10
5.1.30.1170.03010.46
5.1.20.1300.03010.64
5.1.10.1030.02310.19
5.1.00.1000.02710.44
5.0.50.0600.0378.68
5.0.40.0630.0308.63
5.0.30.0570.0238.34
5.0.20.0570.0238.29
5.0.10.0500.0208.24
5.0.00.0000.0338.23
4.4.90.0070.0277.82
4.4.80.0000.0377.82
4.4.70.0000.0207.82
4.4.60.0000.0207.82
4.4.50.0030.0337.82
4.4.40.0030.0407.82
4.4.30.0000.0207.82
4.4.20.0000.0407.82
4.4.10.0000.0207.82
4.4.00.0370.0507.82
4.3.110.0570.0177.82
4.3.100.0670.0277.82
4.3.90.0570.0177.82
4.3.80.0630.0237.82
4.3.70.0700.0277.82
4.3.60.0570.0177.82
4.3.50.0670.0277.82
4.3.40.0600.0437.82
4.3.30.0330.0277.82
4.3.20.0370.0277.82
4.3.10.0270.0207.82
4.3.00.0330.0307.82

preferences:
60.66 ms | 401 KiB | 5 Q