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

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.0150.00618.43
8.3.50.0080.00722.10
8.3.40.0120.00918.69
8.3.30.0030.01018.96
8.3.20.0040.00420.21
8.3.10.0040.00422.05
8.3.00.0040.00422.36
8.2.180.0150.00316.50
8.2.170.0040.01122.96
8.2.160.0100.00320.94
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0070.00026.16
8.2.120.0050.00317.75
8.2.110.0100.00019.45
8.2.100.0060.00617.97
8.2.90.0060.00318.16
8.2.80.0050.00317.97
8.2.70.0040.00417.50
8.2.60.0040.00417.63
8.2.50.0030.00517.63
8.2.40.0070.00417.63
8.2.30.0000.00818.09
8.2.20.0050.00217.73
8.2.10.0040.00419.59
8.2.00.0040.00417.71
8.1.280.0130.00325.92
8.1.270.0070.00022.18
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0030.00622.42
8.1.230.0030.00720.84
8.1.220.0030.00717.78
8.1.210.0090.00318.77
8.1.200.0070.00317.35
8.1.190.0080.00019.01
8.1.180.0040.00418.10
8.1.170.0000.00817.62
8.1.160.0040.00421.95
8.1.150.0000.00818.58
8.1.140.0000.00717.47
8.1.130.0000.00717.71
8.1.120.0040.00417.52
8.1.110.0040.00417.37
8.1.100.0040.00417.52
8.1.90.0000.00717.38
8.1.80.0000.00717.48
8.1.70.0040.00417.50
8.1.60.0000.00817.50
8.1.50.0000.00717.58
8.1.40.0000.00717.57
8.1.30.0000.00717.56
8.1.20.0000.00917.53
8.1.10.0050.00217.41
8.1.00.0000.00717.51
8.0.300.0070.00020.08
8.0.290.0070.00016.75
8.0.280.0030.00318.53
8.0.270.0040.00417.29
8.0.260.0000.00717.02
8.0.250.0040.00417.07
8.0.240.0000.00717.07
8.0.230.0020.00517.14
8.0.220.0050.00316.96
8.0.210.0070.00016.97
8.0.200.0030.00616.95
8.0.190.0070.00016.93
8.0.180.0070.00016.94
8.0.170.0060.00316.91
8.0.160.0000.00916.88
8.0.150.0000.00716.93
8.0.140.0040.00416.93
8.0.130.0080.00013.34
8.0.120.0000.00916.84
8.0.110.0040.00416.82
8.0.100.0030.00517.02
8.0.90.0040.00416.99
8.0.80.0090.00616.97
8.0.70.0040.00417.02
8.0.60.0020.00516.95
8.0.50.0040.00416.87
8.0.30.0140.00817.09
8.0.20.0130.00417.41
8.0.10.0080.00016.99
8.0.00.0110.00716.74
7.4.330.0000.00515.00
7.4.320.0000.00616.53
7.4.300.0000.00616.63
7.4.290.0000.00716.61
7.4.280.0080.00016.45
7.4.270.0040.00416.55
7.4.260.0000.00716.59
7.4.250.0070.00016.61
7.4.240.0030.00416.49
7.4.230.0030.00316.45
7.4.220.0090.00916.71
7.4.210.0060.00916.61
7.4.200.0050.00216.37
7.4.190.0040.00416.73
7.4.160.0030.01316.55
7.4.150.0180.00417.40
7.4.140.0100.00717.86
7.4.130.0110.01216.50
7.4.120.0050.01516.58
7.4.110.0130.00316.66
7.4.100.0070.01016.50
7.4.90.0110.00716.45
7.4.80.0030.01419.39
7.4.70.0130.00316.62
7.4.60.0070.01316.63
7.4.50.0030.00616.47
7.4.40.0030.01322.77
7.4.30.0100.00616.60
7.4.10.0060.00914.94
7.4.00.0050.01015.12
7.3.330.0020.00213.38
7.3.320.0030.00313.31
7.3.310.0040.00416.29
7.3.300.0000.00716.40
7.3.290.0060.01016.39
7.3.280.0130.00416.39
7.3.270.0080.01217.40
7.3.260.0150.00316.44
7.3.250.0090.01216.56
7.3.240.0090.00916.29
7.3.230.0100.01216.39
7.3.210.0030.01716.40
7.3.200.0090.01219.39
7.3.190.0110.00716.49
7.3.180.0060.00916.41
7.3.170.0100.00716.61
7.3.160.0030.01316.48
7.3.130.0110.00714.96
7.3.120.0070.00914.90
7.3.110.0040.01114.96
7.3.100.0100.00314.98
7.3.90.0050.00514.92
7.3.80.0070.00714.86
7.3.70.0000.01314.82
7.3.60.0120.00014.99
7.3.50.0060.00615.02
7.3.40.0040.00414.84
7.3.30.0030.01315.00
7.3.20.0110.00416.64
7.3.10.0140.00016.61
7.3.00.0070.00716.83
7.2.330.0100.00716.58
7.2.320.0080.00816.64
7.2.310.0170.00316.44
7.2.300.0040.01416.77
7.2.290.0090.00616.42
7.2.260.0090.00914.86
7.2.250.0030.01414.95
7.2.240.0100.00715.24
7.2.230.0060.00915.00
7.2.220.0070.00714.79
7.2.210.0040.01115.12
7.2.200.0070.01115.23
7.2.190.0030.01315.08
7.2.180.0130.00314.94
7.2.170.0040.01215.02
7.2.160.0070.00415.18
7.2.150.0030.01216.63
7.2.140.0070.00716.63
7.2.130.0030.01316.74
7.2.120.0060.00917.04
7.2.110.0120.00616.90
7.2.100.0100.00316.78
7.2.90.0100.00616.88
7.2.80.0000.01416.97
7.2.70.0030.00916.91
7.2.60.0070.00716.75
7.2.50.0040.01516.91
7.2.40.0070.00416.86
7.2.30.0130.00316.96
7.2.20.0070.00716.88
7.2.10.0120.00316.92
7.2.00.0070.00718.20
7.1.330.0000.01415.62
7.1.320.0110.00415.60
7.1.310.0000.01516.05
7.1.300.0030.01015.99
7.1.290.0060.00915.81
7.1.280.0070.01015.53
7.1.270.0100.00315.65
7.1.260.0080.00615.80
7.1.250.0030.01015.56
7.1.240.0060.00915.48
7.1.230.0070.00916.04
7.1.220.0030.01015.84
7.1.210.0000.01415.84
7.1.200.0030.01015.71
7.1.190.0060.00915.91
7.1.180.0060.00615.64
7.1.170.0080.00415.86
7.1.160.0070.00715.97
7.1.150.0000.01015.80
7.1.140.0060.00615.81
7.1.130.0100.00315.96
7.1.120.0060.00615.46
7.1.110.0110.00415.63
7.1.100.0080.00317.10
7.1.90.0060.00615.72
7.1.80.0060.00615.89
7.1.70.0080.00316.54
7.1.60.0050.01517.86
7.1.50.0060.00916.24
7.1.40.0080.00315.55
7.1.30.0110.00415.99
7.1.20.0110.00015.94
7.1.10.0000.01515.74
7.1.00.0050.04219.13
7.0.330.0080.00815.40
7.0.320.0100.00315.13
7.0.310.0080.00415.23
7.0.300.0070.00715.36
7.0.290.0050.00315.25
7.0.280.0030.01015.41
7.0.270.0000.00815.20
7.0.260.0040.01115.26
7.0.250.0040.00415.27
7.0.240.0030.01015.37
7.0.230.0040.00415.41
7.0.220.0030.01015.48
7.0.210.0050.00315.36
7.0.200.0110.00416.06
7.0.190.0100.00315.55
7.0.180.0050.00315.48
7.0.170.0030.00915.46
7.0.160.0030.01315.15
7.0.150.0060.00615.50
7.0.140.0040.03918.90
7.0.130.0000.01015.56
7.0.120.0070.00715.33
7.0.110.0030.01415.34
7.0.100.0070.01115.40
7.0.90.0120.00015.54
7.0.80.0000.01415.39
7.0.70.0040.01115.43
7.0.60.0050.03217.64
7.0.50.0040.03116.78
7.0.40.0050.05016.90
7.0.30.0270.02816.86
7.0.20.0120.04216.76
7.0.10.0070.04816.89
7.0.00.0060.04316.89
5.6.400.0060.00914.24
5.6.390.0000.01714.44
5.6.380.0000.01014.34
5.6.370.0040.00714.52
5.6.360.0040.01114.32
5.6.350.0030.01014.33
5.6.340.0040.01114.27
5.6.330.0000.01314.54
5.6.320.0070.00714.27
5.6.310.0070.00714.29
5.6.300.0040.01114.38
5.6.290.0080.00814.67
5.6.280.0080.03817.69
5.6.270.0040.01114.44
5.6.260.0000.01714.20
5.6.250.0110.00014.67
5.6.240.0030.00714.34
5.6.230.0040.01114.16
5.6.220.0000.01214.25
5.6.210.0070.04317.54
5.6.200.0060.04516.28
5.6.190.0060.02317.54
5.6.180.0200.03517.47
5.6.170.0130.02817.53
5.6.160.0040.04617.46
5.6.150.0070.04316.35
5.6.140.0070.03216.25
5.6.130.0060.03316.22
5.6.120.0120.03617.61
5.6.110.0090.02117.91
5.6.100.0080.04017.61
5.6.90.0110.04017.82
5.6.80.0110.04317.27
5.6.70.0030.00814.38
5.6.60.0110.00414.38
5.6.50.0110.00414.31
5.6.40.0120.00613.93
5.6.30.0060.00914.13
5.6.20.0110.00414.35
5.6.10.0040.00414.15
5.6.00.0030.00614.24
5.5.380.0030.01214.49
5.5.370.0060.00914.53
5.5.360.0000.01214.40
5.5.350.0100.04817.54
5.5.340.0120.03216.20
5.5.330.0020.02817.28
5.5.320.0050.03417.39
5.5.310.0120.02717.24
5.5.300.0080.03716.15
5.5.290.0080.04316.21
5.5.280.0030.02517.69
5.5.270.0090.04417.66
5.5.260.0030.03517.69
5.5.250.0160.03517.36
5.5.240.0120.03017.14
5.5.230.0000.00914.55
5.5.220.0070.00314.00
5.5.210.0060.01314.47
5.5.200.0060.00914.14
5.5.190.0040.00914.13
5.5.180.0000.01313.79
5.5.170.0060.00913.84
5.5.160.0030.00914.41
5.5.150.0130.00314.29
5.5.140.0040.00814.30
5.5.130.0090.00314.28
5.5.120.0000.01514.39
5.5.110.0060.00614.43
5.5.100.0000.01514.21
5.5.90.0000.01614.27
5.5.80.0070.01014.10
5.5.70.0030.00914.14
5.5.60.0000.01114.29
5.5.50.0070.01014.30
5.5.40.0100.00714.04
5.5.30.0070.00714.21
5.5.20.0070.00314.10
5.5.10.0060.00914.52
5.5.00.0060.00614.33
5.4.450.0230.02616.14
5.4.440.0360.02016.19
5.4.430.0140.02216.08
5.4.420.0430.01616.14
5.4.410.0450.02416.13
5.4.400.0320.02116.06
5.4.390.0200.01815.96
5.4.380.0200.02915.80
5.4.370.0180.03215.83
5.4.360.0230.02715.79
5.4.350.0200.03015.86
5.4.340.0160.03915.87
5.4.330.0130.00012.97
5.4.320.0060.03012.74
5.4.310.0030.02312.74
5.4.300.0060.02112.74
5.4.290.0030.02612.74
5.4.280.0070.02812.68
5.4.270.0040.02212.67
5.4.260.0030.02612.67
5.4.250.0030.02412.67
5.4.240.0050.02112.67
5.4.230.0050.02312.67
5.4.220.0020.02212.67
5.4.210.0050.02112.67
5.4.200.0060.02312.67
5.4.190.0080.01912.67
5.4.180.0060.01912.67
5.4.170.0060.02312.67
5.4.160.0040.02412.67
5.4.150.0030.02512.67
5.4.140.0020.02412.51
5.4.130.0030.02212.50
5.4.120.0040.02212.48
5.4.110.0060.02112.48
5.4.100.0030.02512.48
5.4.90.0040.02112.48
5.4.80.0060.01912.48
5.4.70.0070.01912.48
5.4.60.0030.02312.48
5.4.50.0040.02012.48
5.4.40.0020.02212.47
5.4.30.0090.01612.47
5.4.20.0050.02112.47
5.4.10.0040.01912.47
5.4.00.0060.01912.22
5.3.290.0050.02312.88
5.3.280.0040.02312.84
5.3.270.0050.02312.85
5.3.260.0050.02612.84
5.3.250.0030.02112.85
5.3.240.0030.02312.85
5.3.230.0090.02512.84
5.3.220.0060.02212.82
5.3.210.0040.02312.83
5.3.200.0040.02312.82
5.3.190.0030.02212.82
5.3.180.0040.02312.82
5.3.170.0050.02012.82
5.3.160.0040.02112.82
5.3.150.0050.02012.82
5.3.140.0060.02012.81
5.3.130.0040.02312.81
5.3.120.0060.02112.81
5.3.110.0030.02212.81
5.3.100.0050.02112.54
5.3.90.0040.02112.53
5.3.80.0050.02312.52
5.3.70.0060.02912.52
5.3.60.0040.02912.52
5.3.50.0040.02912.49
5.3.40.0060.02812.49
5.3.30.0040.02312.47
5.3.20.0040.02112.36
5.3.10.0030.02012.34
5.3.00.0060.02012.33
5.2.170.0010.0339.20
5.2.160.0050.0279.20
5.2.150.0040.0309.20
5.2.140.0060.0319.20
5.2.130.0050.0309.16
5.2.120.0040.0319.16
5.2.110.0060.0299.17
5.2.100.0040.0299.17
5.2.90.0050.0299.16
5.2.80.0050.0309.16
5.2.70.0060.0309.16
5.2.60.0060.0379.11
5.2.50.0020.0339.08
5.2.40.0050.0349.05
5.2.30.0050.0289.03
5.2.20.0060.0279.03
5.2.10.0040.0288.96
5.2.00.0060.0278.80
5.1.60.0050.0268.09
5.1.50.0060.0238.09
5.1.40.0050.0248.08
5.1.30.0060.0238.42
5.1.20.0050.0268.46
5.1.10.0030.0268.17
5.1.00.0050.0248.17
5.0.50.0040.0196.66
5.0.40.0020.0206.51
5.0.30.0050.0296.32
5.0.20.0010.0216.30
5.0.10.0030.0196.27
5.0.00.0010.0326.27
4.4.90.0020.0164.77
4.4.80.0010.0174.75
4.4.70.0020.0164.76
4.4.60.0030.0154.75
4.4.50.0020.0164.77
4.4.40.0040.0244.71
4.4.30.0020.0164.76
4.4.20.0050.0144.85
4.4.10.0040.0144.85
4.4.00.0030.0254.75
4.3.110.0040.0184.67
4.3.100.0030.0214.67
4.3.90.0050.0184.63
4.3.80.0020.0254.59
4.3.70.0020.0184.63
4.3.60.0020.0164.63
4.3.50.0040.0154.63
4.3.40.0050.0254.54
4.3.30.0030.0163.33
4.3.20.0020.0163.31
4.3.10.0020.0163.28
4.3.00.0270.01713.27

preferences:
49.32 ms | 401 KiB | 5 Q