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

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.0070.00718.82
8.3.30.0080.00819.13
8.3.20.0040.00420.38
8.3.10.0040.00421.92
8.3.00.0050.00322.27
8.2.170.0110.00422.96
8.2.160.0100.00321.07
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00417.85
8.2.110.0000.00822.38
8.2.100.0110.00018.03
8.2.90.0040.00419.53
8.2.80.0000.00818.05
8.2.70.0060.00317.75
8.2.60.0000.00818.05
8.2.50.0050.00318.07
8.2.40.0040.00418.34
8.2.30.0070.00018.27
8.2.20.0000.00817.87
8.2.10.0000.00819.53
8.2.00.0080.00017.81
8.1.270.0000.00722.19
8.1.260.0020.00526.35
8.1.250.0080.00028.09
8.1.240.0060.00323.97
8.1.230.0080.00319.13
8.1.220.0080.00017.90
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0040.00417.53
8.1.180.0000.00818.10
8.1.170.0060.00318.71
8.1.160.0040.00422.11
8.1.150.0000.00818.69
8.1.140.0030.00517.42
8.1.130.0050.00317.93
8.1.120.0070.00017.49
8.1.110.0040.00417.44
8.1.100.0000.00717.54
8.1.90.0050.00317.55
8.1.80.0030.00517.52
8.1.70.0040.00417.58
8.1.60.0040.00417.61
8.1.50.0000.00817.54
8.1.40.0000.00717.54
8.1.30.0030.00517.73
8.1.20.0030.00617.75
8.1.10.0080.00017.52
8.1.00.0060.00317.64
8.0.300.0040.00418.77
8.0.290.0000.00717.30
8.0.280.0070.00018.63
8.0.270.0070.00017.26
8.0.260.0030.00316.88
8.0.250.0070.00016.97
8.0.240.0050.00217.12
8.0.230.0070.00017.11
8.0.220.0000.00817.02
8.0.210.0000.00717.04
8.0.200.0030.00617.12
8.0.190.0000.00717.15
8.0.180.0050.00317.07
8.0.170.0060.00317.09
8.0.160.0040.00417.05
8.0.150.0040.00416.94
8.0.140.0020.00516.89
8.0.130.0050.00013.44
8.0.120.0000.00816.96
8.0.110.0030.00616.94
8.0.100.0040.00416.93
8.0.90.0000.00716.95
8.0.80.0170.00016.98
8.0.70.0040.00417.04
8.0.60.0050.00317.02
8.0.50.0040.00416.86
8.0.30.0070.01217.16
8.0.20.0080.01117.40
8.0.10.0000.00717.23
8.0.00.0140.00516.64
7.4.330.0020.00215.16
7.4.320.0050.00216.75
7.4.300.0030.00316.63
7.4.290.0000.00716.66
7.4.280.0000.00716.73
7.4.270.0030.00316.71
7.4.260.0050.00316.71
7.4.250.0060.00316.68
7.4.240.0050.00216.58
7.4.230.0000.00716.50
7.4.220.0090.01216.72
7.4.210.0090.00616.63
7.4.200.0070.00016.70
7.4.190.0000.00716.76
7.4.160.0100.00616.52
7.4.150.0070.01017.40
7.4.140.0050.01417.86
7.4.130.0120.00516.51
7.4.120.0090.00916.63
7.4.110.0100.00716.60
7.4.100.0090.00916.77
7.4.90.0170.01716.53
7.4.80.0150.00919.39
7.4.70.0060.00916.50
7.4.60.0040.01516.63
7.4.50.0000.00816.51
7.4.40.0100.00722.77
7.4.30.0100.00716.75
7.4.00.0070.01215.25
7.3.330.0030.00313.34
7.3.320.0050.00013.27
7.3.310.0000.00716.60
7.3.300.0070.00016.47
7.3.290.0030.01616.53
7.3.280.0100.00616.51
7.3.270.0150.00317.40
7.3.260.0110.00716.63
7.3.250.0100.01016.65
7.3.240.0070.01016.57
7.3.230.0100.00716.58
7.3.210.0000.02016.61
7.3.200.0130.00619.39
7.3.190.0110.01316.43
7.3.180.0100.01016.64
7.3.170.0080.00716.54
7.3.160.0080.00816.55
7.3.120.0020.01415.12
7.3.110.0000.01815.10
7.3.100.0060.01014.73
7.3.90.0000.01015.02
7.3.80.0040.01114.91
7.3.70.0030.00914.91
7.3.60.0090.00615.03
7.3.50.0070.00714.63
7.3.40.0070.00414.95
7.3.30.0030.01214.78
7.3.20.0030.01016.92
7.3.10.0090.00416.73
7.3.00.0070.00716.73
7.2.330.0030.01316.45
7.2.320.0060.01216.88
7.2.310.0090.01516.53
7.2.300.0090.00916.61
7.2.290.0080.00816.51
7.2.250.0080.01115.39
7.2.240.0070.01014.91
7.2.230.0030.01515.37
7.2.220.0090.00615.25
7.2.210.0030.01214.95
7.2.200.0000.01215.23
7.2.190.0080.00815.18
7.2.180.0040.01115.19
7.2.170.0000.01215.25
7.2.60.0120.00416.87
7.2.00.0110.00319.69
7.1.330.0070.00715.62
7.1.320.0030.01315.85
7.1.310.0030.01216.16
7.1.300.0100.00315.90
7.1.290.0070.00715.86
7.1.280.0000.00816.04
7.1.270.0070.00715.93
7.1.260.0030.01015.78
7.1.200.0030.00715.59
7.1.100.0030.01018.07
7.1.70.0060.00616.89
7.1.60.0180.00719.82
7.1.50.0060.01516.83
7.1.00.0070.07022.72
7.0.200.0110.00416.65
7.0.140.0070.07322.37
7.0.60.0030.04320.11
7.0.50.0100.08018.06
7.0.40.0100.07320.36
7.0.30.0300.07720.23
7.0.20.0200.05320.35
7.0.10.0000.05020.25
7.0.00.0000.07720.42
5.6.280.0070.06721.28
5.6.210.0070.08020.71
5.6.200.0070.08718.42
5.6.190.0170.07320.70
5.6.180.0130.07720.90
5.6.170.0200.04320.77
5.6.160.0030.05320.56
5.6.150.0100.08318.28
5.6.140.0070.08018.31
5.6.130.0070.08318.30
5.6.120.0000.04321.10
5.6.110.0070.06321.29
5.6.100.0070.05721.22
5.6.90.0030.09021.27
5.6.80.0130.07720.58
5.5.350.0030.06720.64
5.5.340.0070.05718.22
5.5.330.0130.07720.56
5.5.320.0000.07020.39
5.5.310.0330.07320.56
5.5.300.0070.03718.20
5.5.290.0070.03718.18
5.5.280.0100.05021.03
5.5.270.0100.05021.04
5.5.260.0000.04320.96
5.5.250.0030.08720.92
5.5.240.0100.05320.27
5.4.450.0300.04319.51
5.4.440.0270.08019.59
5.4.430.0300.06719.48
5.4.420.0230.07719.64
5.4.410.0230.07719.48
5.4.400.0270.07319.22
5.4.390.0400.05319.38
5.4.380.0230.06019.07
5.4.370.0370.06719.26
5.4.360.0330.07019.38
5.4.350.0370.05019.18
5.4.340.0270.03319.22
5.4.320.0200.04019.00
5.4.310.0330.06319.18
5.4.300.0200.05319.50
5.4.290.0300.07019.37
5.4.280.0300.06718.99
5.4.270.0330.07319.50
5.4.260.0230.04719.07
5.4.250.0230.04718.99
5.4.240.0270.07019.34
5.4.230.0270.04319.17
5.4.220.0330.06319.38
5.4.210.0330.07019.27
5.4.200.0400.06019.36
5.4.190.0300.07319.36
5.4.180.0200.04719.36
5.4.170.0300.07019.34
5.4.160.0270.03319.23
5.4.150.0370.07018.95
5.4.140.0330.05716.55
5.4.130.0270.04716.50
5.4.120.0230.03316.62
5.4.110.0230.03716.73
5.4.100.0130.04316.75
5.4.90.0170.03716.66
5.4.80.0170.03316.72
5.4.70.0200.03016.74
5.4.60.0170.03716.53
5.4.50.0170.03716.61
5.4.40.0130.05016.41
5.4.30.0170.04316.51
5.4.20.0230.03016.69
5.4.10.0230.03016.67
5.4.00.0100.04316.14
5.3.290.0300.06314.72
5.3.280.0370.05714.73
5.3.270.0430.04014.74
5.3.260.0270.05714.75
5.3.250.0330.07014.73
5.3.240.0300.05014.79
5.3.230.0300.05314.81
5.3.220.0200.03714.69
5.3.210.0230.03314.72
5.3.200.0200.03714.79
5.3.190.0270.04014.92
5.3.180.0100.04314.77
5.3.170.0230.04314.92
5.3.160.0130.04014.62
5.3.150.0170.03314.79
5.3.140.0230.03014.77
5.3.130.0130.04014.65
5.3.120.0130.04014.90
5.3.110.0270.03014.67
5.3.100.0170.03714.21
5.3.90.0130.04014.21
5.3.80.0030.04714.38
5.3.70.0170.03714.13
5.3.60.0170.03714.30
5.3.50.0100.04314.00
5.3.40.0200.04314.14
5.3.30.0170.03713.97
5.3.20.0200.03013.98
5.3.10.0130.03713.84
5.3.00.0230.03013.70
5.2.170.0130.03011.93
5.2.160.0230.02011.93
5.2.150.0230.02011.93
5.2.140.0170.02711.93
5.2.130.0200.02311.93
5.2.120.0170.02711.93
5.2.110.0130.03011.93
5.2.100.0170.02711.93
5.2.90.0070.03311.93
5.2.80.0170.02711.93
5.2.70.0100.04011.93
5.2.60.0130.03011.93
5.2.50.0170.03011.93
5.2.40.0070.03311.93
5.2.30.0070.03311.93
5.2.20.0100.03011.96
5.2.10.0100.03011.96
5.2.00.0230.04011.96
5.1.60.0230.04011.97
5.1.50.0200.05011.97
5.1.40.0170.02712.00
5.1.30.0170.04712.00
5.1.20.0170.03012.00
5.1.10.0130.05712.00
5.1.00.0270.04312.00
5.0.50.0070.04312.00
5.0.40.0100.04312.01
5.0.30.0130.05012.01
5.0.20.0170.03712.03
5.0.10.0130.04312.06
5.0.00.0100.03312.06
4.4.90.0030.01711.93
4.4.80.0030.01711.93
4.4.70.0030.01711.96
4.4.60.0030.01711.96
4.4.50.0070.01711.96
4.4.40.0070.02711.97
4.4.30.0070.02011.98
4.4.20.0070.02012.00
4.4.10.0070.02012.00
4.4.00.0100.05012.00
4.3.110.0100.02712.01
4.3.100.0100.04312.01
4.3.90.0100.01712.04
4.3.80.0100.02712.06
4.3.70.0070.02712.07
4.3.60.0130.02712.07
4.3.50.0100.02312.07
4.3.40.0100.04712.07
4.3.30.0130.03012.07
4.3.20.0030.04012.07
4.3.10.0070.03012.07
4.3.00.0030.04012.07

preferences:
40.76 ms | 400 KiB | 5 Q