3v4l.org

run code in 300+ PHP versions simultaneously
<?php function quickRandom($length = 16) { $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $str = substr(str_shuffle(str_repeat($pool, 5)), 0, $length); if ($length > 310) { return $str . quickRandom($length - 310); } return $str; } $i = 100000; while($i--) { quickRandom(311); }

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)
7.2.00.0071.28719.25
7.1.100.0031.97118.02
7.1.70.0031.76817.19
7.1.60.0131.72819.43
7.1.50.0001.75016.99
7.1.00.0001.55022.46
7.0.200.0400.67916.92
7.0.140.0130.66722.21
7.0.60.0130.68719.87
7.0.50.0030.64017.85
7.0.40.0030.68020.13
7.0.30.0230.71020.09
7.0.20.0330.69020.13
7.0.10.0230.68320.12
7.0.00.0030.65320.06
5.6.280.0000.74720.82
5.6.210.0000.65720.62
5.6.200.0100.75718.20
5.6.190.0070.75320.49
5.6.180.0300.73320.53
5.6.170.0300.85720.55
5.6.160.0100.77020.43
5.6.150.0030.73718.29
5.6.140.0070.76018.14
5.6.130.0130.77318.19
5.6.120.0170.74021.14
5.6.110.0100.87720.99
5.6.100.0030.77021.11
5.6.90.0070.76721.01
5.6.80.0000.77720.54
5.6.70.0300.88720.38
5.5.350.0370.74020.38
5.5.340.0070.76718.08
5.5.330.0070.71720.40
5.5.320.0230.72720.14
5.5.310.0230.79320.35
5.5.300.0070.74017.98
5.5.290.0200.89317.95
5.5.280.0130.73320.88
5.5.270.0070.65720.76
5.5.260.0170.73020.77
5.5.250.0030.78020.70
5.5.240.0830.77320.25
5.4.450.0631.12319.45
5.4.440.0331.26719.56
5.4.430.0431.03719.57
5.4.420.0271.13719.45
5.4.410.0101.12019.00
5.4.400.0371.11718.85
5.4.390.0401.07318.79
5.4.380.0330.99018.76
5.4.370.0070.96318.78
5.4.360.0200.95718.60
5.4.350.0060.97612.02
5.4.340.0090.93012.02
5.4.320.0100.73512.50
5.4.310.0080.82212.50
5.4.300.0080.75212.50
5.4.290.0100.76012.50
5.4.280.0070.78112.40
5.4.270.0060.79512.40
5.4.260.0200.90012.40
5.4.250.0031.42319.01
5.4.240.0131.19319.01
5.4.230.0071.62718.79
5.4.220.0171.16019.23
5.4.210.0001.61718.98
5.4.200.0071.69318.73
5.4.190.0131.20318.64
5.4.180.0131.29318.76
5.4.170.0131.08019.00
5.4.160.0071.16018.75
5.4.150.0031.14318.82
5.4.140.0131.13716.48
5.4.130.0101.03316.37
5.4.120.0101.09316.30
5.4.110.0101.03316.49
5.4.100.0100.97716.41
5.4.90.0171.17716.39
5.4.80.0231.17716.45
5.4.70.0071.09716.61
5.4.60.0031.11716.60
5.4.50.0101.15016.39
5.4.40.0101.23016.39
5.4.30.0101.16316.43
5.4.20.0101.55316.46
5.4.10.0101.34016.47
5.4.00.0071.09015.84
5.3.290.0090.82912.80
5.3.280.0131.42714.68
5.3.270.0071.29014.68
5.3.260.0131.19314.59
5.3.250.0071.22014.75
5.3.240.0071.14014.43
5.3.230.0101.18714.59
5.3.220.0131.16714.63
5.3.210.0071.21314.57
5.3.200.0171.19314.66
5.3.190.0001.25314.55
5.3.180.0171.17714.79
5.3.170.0101.22014.64
5.3.160.0031.12314.58
5.3.150.0171.20014.54
5.3.140.0131.20014.77
5.3.130.0101.11314.77
5.3.120.0071.26014.71
5.3.110.0171.20014.73
5.3.100.0101.35314.02
5.3.90.0171.26714.23
5.3.80.0101.07314.11
5.3.70.0101.12014.03
5.3.60.0271.21014.02
5.3.50.0171.17714.03
5.3.40.0131.22714.02
5.3.30.0201.14013.99
5.3.20.0171.34313.85
5.3.10.0071.22713.72
5.3.00.0071.30013.47
5.2.170.0071.27711.15
5.2.160.0071.51311.32
5.2.150.0031.37011.30
5.2.140.0031.33311.20
5.2.130.0171.33311.26
5.2.120.0131.32711.16
5.2.110.0101.21711.17
5.2.100.0031.29011.08
5.2.90.0101.28711.18
5.2.80.0131.19711.17
5.2.70.0211.47011.26
5.2.60.0121.24911.17
5.2.50.0131.34311.20
5.2.40.0031.23010.98
5.2.30.0031.26010.80
5.2.20.0131.31310.95
5.2.10.0171.31710.85
5.2.00.0001.22710.80
5.1.60.0131.40710.00
5.1.50.0101.31710.09
5.1.40.0151.48910.02
5.1.30.0101.51310.51
5.1.20.0151.65810.41
5.1.10.0131.44710.03
5.1.00.0141.81810.38
5.0.50.0071.5708.52
5.0.40.0001.4878.67
5.0.30.0071.3478.37
5.0.20.0031.3478.25
5.0.10.0001.4438.24
5.0.00.0171.6578.15
4.4.90.0101.6236.18
4.4.80.0131.5876.18
4.4.70.0001.6776.18
4.4.60.0001.6576.18
4.4.50.0101.3836.18
4.4.40.0071.4776.82
4.4.30.0031.3706.82
4.4.20.0101.5176.82
4.4.10.0001.5706.82
4.4.00.0071.3376.82
4.3.110.0001.4636.82
4.3.100.0071.3836.82
4.3.90.0031.5336.82
4.3.80.0071.6036.82
4.3.70.0071.4706.82
4.3.60.0071.9306.82
4.3.50.0231.6736.82
4.3.40.0031.3906.82
4.3.30.0171.2636.82
4.3.20.0101.3236.82
4.3.10.0101.4136.82
4.3.00.0071.2206.88

preferences:
41.12 ms | 400 KiB | 5 Q