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 .= $n % 1000000000000 > 0 ? nice_number($n % 1000000000000) : ''; return $str; } else if ($n > 1000000000) { $str = round(($n / 1000000000), 0) . ' bn '; $str .= $n % 1000000000 > 0 ? nice_number($n % 1000000000) : ''; return $str; } else if ($n > 1000000) { $str = round(($n / 1000000), 0) . ' mn '; $str .= $n % 1000000 > 0 ? nice_number($n % 1000000) : ''; return $str; } else if ($n > 1000) return round(($n / 1000), 0) . ' 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.00718.56
8.3.50.0150.00622.10
8.3.40.0040.01118.66
8.3.30.0140.00019.13
8.3.20.0000.00820.46
8.3.10.0040.00422.27
8.3.00.0040.00422.52
8.2.180.0120.00816.75
8.2.170.0070.01422.96
8.2.160.0070.00721.08
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00019.48
8.2.110.0000.00922.23
8.2.100.0000.01217.97
8.2.90.0040.00419.38
8.2.80.0080.00018.05
8.2.70.0030.00617.63
8.2.60.0000.00818.15
8.2.50.0000.00818.07
8.2.40.0000.00818.34
8.2.30.0060.00318.23
8.2.20.0020.00517.73
8.2.10.0000.00817.92
8.2.00.0040.00417.70
8.1.280.0130.00325.92
8.1.270.0040.00422.23
8.1.260.0060.00326.35
8.1.250.0090.00028.09
8.1.240.0090.00023.89
8.1.230.0130.00019.22
8.1.220.0000.00817.79
8.1.210.0040.00418.77
8.1.200.0030.00717.35
8.1.190.0050.00317.51
8.1.180.0000.00818.10
8.1.170.0040.00418.45
8.1.160.0050.00221.96
8.1.150.0060.00318.71
8.1.140.0070.00017.45
8.1.130.0030.00317.89
8.1.120.0030.00517.52
8.1.110.0000.00717.45
8.1.100.0000.00817.46
8.1.90.0040.00417.38
8.1.80.0000.00717.54
8.1.70.0000.00717.52
8.1.60.0000.00917.63
8.1.50.0040.00417.62
8.1.40.0030.00617.48
8.1.30.0000.00917.61
8.1.20.0050.00317.75
8.1.10.0070.00017.45
8.1.00.0040.00417.53
8.0.300.0020.00518.77
8.0.290.0050.00217.18
8.0.280.0030.00318.43
8.0.270.0070.00017.18
8.0.260.0000.00616.84
8.0.250.0070.00016.95
8.0.240.0030.00516.96
8.0.230.0000.00716.99
8.0.220.0070.00017.07
8.0.210.0000.00716.93
8.0.200.0090.00016.95
8.0.190.0080.00017.13
8.0.180.0040.00417.00
8.0.170.0060.00316.89
8.0.160.0000.00716.98
8.0.150.0000.00716.93
8.0.140.0070.00016.97
8.0.130.0040.00413.46
8.0.120.0000.00717.05
8.0.110.0020.00516.92
8.0.100.0070.00016.92
8.0.90.0000.00817.14
8.0.80.0090.00916.98
8.0.70.0030.00517.09
8.0.60.0000.00717.00
8.0.50.0070.00016.88
8.0.30.0060.01417.01
8.0.20.0110.00717.40
8.0.10.0070.00017.12
8.0.00.0130.00717.00
7.4.330.0050.00015.08
7.4.320.0030.00316.51
7.4.300.0000.00616.43
7.4.290.0030.00316.64
7.4.280.0000.00716.70
7.4.270.0040.00416.63
7.4.260.0040.00416.51
7.4.250.0040.00416.63
7.4.240.0040.00316.58
7.4.230.0040.00416.48
7.4.220.0060.01916.67
7.4.210.0040.01016.59
7.4.200.0040.00316.65
7.4.190.0070.00016.72
7.4.160.0090.00616.66
7.4.150.0060.01317.40
7.4.140.0150.00617.86
7.4.130.0130.00816.49
7.4.120.0090.00916.56
7.4.110.0130.01016.65
7.4.100.0080.01616.56
7.4.90.0090.00916.52
7.4.80.0110.00719.39
7.4.70.0030.01316.62
7.4.60.0100.00716.56
7.4.50.0040.00416.61
7.4.40.0170.00022.77
7.4.30.0060.01016.48
7.4.00.0070.00715.13
7.3.330.0000.00513.22
7.3.320.0030.00313.38
7.3.310.0030.00316.33
7.3.300.0000.00716.31
7.3.290.0040.00916.37
7.3.280.0070.01016.41
7.3.270.0120.00917.40
7.3.260.0100.01416.54
7.3.250.0080.00816.44
7.3.240.0040.01516.49
7.3.230.0110.00716.63
7.3.210.0130.00416.49
7.3.200.0120.00619.39
7.3.190.0120.00916.45
7.3.180.0090.00616.59
7.3.170.0170.00416.64
7.3.160.0120.00316.53
7.3.120.0000.01614.53
7.3.10.0130.00816.44
7.3.00.0150.00616.40
7.2.330.0090.01116.85
7.2.320.0040.01516.51
7.2.310.0140.00316.52
7.2.300.0100.01216.64
7.2.290.0090.01216.34
7.2.130.0070.01316.96
7.2.120.0210.01016.70
7.2.110.0090.01016.59
7.2.100.0110.00716.59
7.2.90.0070.00916.61
7.2.80.0030.01416.63
7.2.70.0090.00716.74
7.2.60.0170.00316.58
7.2.50.0110.00716.48
7.2.40.0080.00916.50
7.2.30.0040.01016.36
7.2.20.0050.00916.51
7.2.10.0110.00816.71
7.2.00.0090.00717.49
7.1.250.0070.01015.64
7.1.240.0060.00615.84
7.1.230.0040.00815.41
7.1.220.0030.01015.89
7.1.210.0000.01315.75
7.1.200.0070.00715.62
7.1.190.0070.00715.71
7.1.180.0040.00715.84
7.1.170.0030.01015.75
7.1.160.0000.01515.55
7.1.150.0030.01015.94
7.1.140.0030.01015.88
7.1.130.0030.01315.73
7.1.120.0090.00315.49
7.1.110.0030.00615.77
7.1.100.0060.00616.84
7.1.90.0070.00315.79
7.1.80.0030.00715.64
7.1.70.0040.00616.34
7.1.60.0060.01017.90
7.1.50.0020.00916.40
7.1.40.0050.00515.57
7.1.30.0080.00315.87
7.1.20.0070.00715.86
7.1.10.0030.00715.77
7.1.00.0020.04719.01
7.0.330.0150.00015.46
7.0.320.0000.01315.41
7.0.310.0070.00715.18
7.0.300.0150.00015.39
7.0.290.0030.01015.38
7.0.280.0070.01015.18
7.0.270.0080.00815.29
7.0.260.0030.01015.32
7.0.250.0030.01015.39
7.0.240.0040.01115.41
7.0.230.0060.00615.54
7.0.220.0030.00915.52
7.0.210.0040.00415.57
7.0.200.0050.00716.08
7.0.190.0070.00315.46
7.0.180.0040.01115.43
7.0.170.0030.01015.40
7.0.160.0000.00915.11
7.0.150.0090.00615.43
7.0.140.0080.03718.63
7.0.130.0060.00915.66
7.0.120.0030.01015.48
7.0.110.0070.00015.24
7.0.100.0030.01015.55
7.0.90.0030.00915.56
7.0.80.0060.00315.52
7.0.70.0030.00615.36
7.0.60.0050.04517.60
7.0.50.0050.02216.65
7.0.40.0030.03616.88
7.0.30.0280.04316.95
7.0.20.0200.03016.75
7.0.10.0130.02616.77
7.0.00.0080.02116.77
5.6.380.0000.01314.25
5.6.370.0000.01514.54
5.6.360.0070.01014.16
5.6.350.0120.00314.28
5.6.340.0040.01113.99
5.6.330.0040.01114.43
5.6.320.0000.01114.42
5.6.310.0070.00714.54
5.6.300.0040.01114.32
5.6.290.0140.00014.41
5.6.280.0030.03917.70
5.6.270.0000.01314.39
5.6.260.0150.00014.42
5.6.250.0030.00914.23
5.6.240.0000.01114.46
5.6.230.0090.00414.43
5.6.220.0090.00314.17
5.6.210.0070.04517.34
5.6.200.0100.04316.10
5.6.190.0120.04217.63
5.6.180.0150.02017.38
5.6.170.0130.03517.28
5.6.160.0060.04317.58
5.6.150.0030.03516.17
5.6.140.0050.02716.21
5.6.130.0070.02816.32
5.6.120.0070.04217.80
5.6.110.0080.03717.71
5.6.100.0090.03917.58
5.6.90.0080.04817.67
5.6.80.0050.03817.30
5.6.70.0180.04317.39
5.6.60.0000.01414.50
5.6.50.0070.01014.12
5.6.40.0040.01113.98
5.6.30.0060.01214.36
5.6.20.0030.00914.32
5.6.10.0060.00614.16
5.6.00.0000.01414.14
5.5.380.0040.00511.45
5.5.370.0070.00311.38
5.5.360.0040.00411.10
5.5.350.0120.01815.91
5.5.340.0070.03014.55
5.5.330.0090.02515.70
5.5.320.0170.03215.56
5.5.310.0100.02715.67
5.5.300.0050.03514.31
5.5.290.0050.04314.47
5.5.280.0030.02216.04
5.5.270.0030.04415.98
5.5.260.0080.03315.86
5.5.250.0130.03715.71
5.5.240.0030.04215.78
5.5.230.0030.01011.16
5.5.220.0030.00311.20
5.5.210.0030.00311.12
5.5.200.0030.00610.92
5.5.190.0060.00010.77
5.5.180.0090.00010.96
5.5.170.0090.00311.26
5.5.160.0000.01110.80
5.5.150.0000.00611.25
5.5.140.0030.00711.10
5.5.130.0080.00011.27
5.5.120.0070.00411.04
5.5.110.0060.00611.32
5.5.100.0030.00911.13
5.5.90.0070.00310.93
5.5.80.0060.00611.05
5.5.70.0000.01011.30
5.5.60.0030.00611.20
5.5.50.0060.00611.23
5.5.40.0070.00710.94
5.5.30.0000.01011.00
5.5.20.0030.01011.09
5.5.10.0000.01111.01
5.5.00.0030.00911.21
5.4.450.0480.03715.33
5.4.440.0100.02815.31
5.4.430.0030.03215.44
5.4.420.0040.03115.39
5.4.410.0110.03215.10
5.4.400.0050.04414.91
5.4.390.0110.02714.96
5.4.380.0230.02314.66
5.4.370.0200.01714.88
5.4.360.0050.03214.79
5.4.350.0100.02914.87
5.4.340.0070.03514.79
5.4.330.0040.00410.87
5.4.320.0040.02211.78
5.4.310.0040.02211.78
5.4.300.0030.02511.84
5.4.290.0050.02711.88
5.4.280.0060.02111.83
5.4.270.0050.02111.80
5.4.260.0050.02111.71
5.4.250.0080.01611.67
5.4.240.0060.01911.77
5.4.230.0040.02211.68
5.4.220.0040.02011.70
5.4.210.0030.02011.65
5.4.200.0040.02311.59
5.4.190.0020.02211.78
5.4.180.0020.02211.77
5.4.170.0030.02111.58
5.4.160.0040.02311.73
5.4.150.0030.02211.69
5.4.140.0030.02211.42
5.4.130.0060.01811.51
5.4.120.0040.02111.55
5.4.110.0050.01811.51
5.4.100.0070.01911.52
5.4.90.0060.02011.57
5.4.80.0070.02011.67
5.4.70.0060.02011.46
5.4.60.0040.01911.57
5.4.50.0080.01611.57
5.4.40.0030.02011.54
5.4.30.0050.01911.55
5.4.20.0020.02311.41
5.4.10.0040.02111.58
5.4.00.0060.01811.28
5.3.290.0050.02311.83
5.3.280.0020.02511.63
5.3.270.0030.02411.66
5.3.260.0060.02111.70
5.3.250.0080.01911.67
5.3.240.0050.02011.65
5.3.230.0020.02311.64
5.3.220.0060.02211.64
5.3.210.0030.02411.46
5.3.200.0030.02311.45
5.3.190.0050.02211.59
5.3.180.0080.01811.71
5.3.170.0060.02111.63
5.3.160.0030.02311.65
5.3.150.0030.02011.60
5.3.140.0050.02011.48
5.3.130.0020.02411.50
5.3.120.0040.02111.50
5.3.110.0030.02411.65
5.3.100.0020.02311.23
5.3.90.0040.02211.25
5.3.80.0030.02411.37
5.3.70.0040.02211.35
5.3.60.0070.01811.29
5.3.50.0040.02111.27
5.3.40.0040.01911.29
5.3.30.0030.02311.20
5.3.20.0060.02011.02
5.3.10.0040.01811.02
5.3.00.0050.01811.01
5.2.170.0040.0169.57
5.2.160.0050.0169.57
5.2.150.0070.0159.57
5.2.140.0050.0189.57
5.2.130.0040.0159.55
5.2.120.0030.0169.55
5.2.110.0030.0179.55
5.2.100.0020.0199.56
5.2.90.0020.0219.55
5.2.80.0070.0149.55
5.2.70.0050.0189.55
5.2.60.0030.0179.53
5.2.50.0030.0199.51
5.2.40.0040.0189.50
5.2.30.0030.0189.48
5.2.20.0030.0169.48
5.2.10.0060.0189.45
5.2.00.0040.0179.37
5.1.60.0030.0189.02
5.1.50.0020.0169.01
5.1.40.0040.0179.01
5.1.30.0060.0149.18
5.1.20.0040.0159.20
5.1.10.0040.0149.05
5.1.00.0040.0159.05
5.0.50.0030.0128.30
5.0.40.0030.0108.22
5.0.30.0060.0188.13
5.0.20.0040.0148.12
5.0.10.0040.0108.11
5.0.00.0010.0188.10
4.4.90.0050.0077.35
4.4.80.0040.0087.34
4.4.70.0020.0127.34
4.4.60.0030.0107.34
4.4.50.0030.0087.35
4.4.40.0010.0167.32
4.4.30.0050.0077.34
4.4.20.0030.0107.39
4.4.10.0030.0107.39
4.4.00.0010.0157.34
4.3.110.0010.0117.29
4.3.100.0040.0107.30
4.3.90.0040.0087.28
4.3.80.0000.0167.26
4.3.70.0010.0117.28
4.3.60.0020.0107.28
4.3.50.0040.0077.28
4.3.40.0030.0157.23
4.3.30.0030.0076.64
4.3.20.0020.0096.63
4.3.10.0020.0096.61
4.3.00.0020.01111.60

preferences:
49.35 ms | 401 KiB | 5 Q