3v4l.org

run code in 300+ PHP versions simultaneously
<?php function quickRandom($length = 16) { $length = intval($length, 10); $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $pool_length = 62; $output = ''; while($length--) { $output .= $pool[rand(0,$pool_length - 1)]; } return $output; } $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.1.70.0002.50116.77
7.1.60.0032.49819.43
7.1.50.0072.49417.20
7.1.00.0002.50022.24
7.0.200.0072.49416.72
7.0.140.0032.49721.95
7.0.100.0002.50019.91
7.0.90.0232.47720.11
7.0.80.0032.49719.89
7.0.70.0072.44319.86
7.0.60.0272.43719.95
7.0.50.2332.26720.32
7.0.40.0102.49019.98
7.0.30.0072.49320.08
7.0.20.0072.44020.07
7.0.10.0072.49320.07
7.0.00.0072.49320.00
5.6.280.0072.49320.98
5.6.250.0102.49020.61
5.6.240.0102.49020.58
5.6.230.0202.48020.64
5.6.220.0102.49020.59
5.6.210.0072.49320.41
5.6.200.0072.45721.09
5.6.190.0002.50020.98
5.6.180.0072.49321.04
5.6.170.0032.47020.97
5.6.160.0032.49721.02
5.6.150.0132.48720.96
5.6.140.0072.49321.09
5.6.130.0032.49721.01
5.6.120.0032.49720.99
5.6.110.0132.48720.95
5.6.100.0032.49720.98
5.6.90.0132.48720.99
5.6.80.0072.49320.37
5.6.70.0002.50020.28
5.6.60.0032.49720.26
5.6.50.0072.49320.31
5.6.40.0072.49320.32
5.6.30.0072.48720.38
5.6.20.0132.46020.41
5.6.10.0032.47020.34
5.6.00.0032.49720.31
5.5.380.0172.48320.45
5.5.370.0232.29320.43
5.5.360.0472.25320.55
5.5.350.0302.34320.51
5.5.340.0431.83320.95
5.5.330.0731.36020.79
5.5.320.0372.17320.88
5.5.310.0002.47020.86
5.5.300.0302.40720.95
5.5.290.0302.41320.93
5.5.280.0172.44720.97
5.5.270.0202.43720.87
5.5.260.0172.44720.94
5.5.250.0172.44020.67
5.5.240.0172.46320.35
5.5.230.0272.43720.33
5.5.220.0172.44020.33
5.5.210.0272.38720.27
5.5.200.0302.39320.28
5.5.190.0202.36020.30
5.5.180.0132.38320.28
5.5.160.0232.42720.30
5.5.150.0172.41720.28
5.5.140.0232.39720.28
5.5.130.0272.38720.31
5.5.120.0202.41020.24
5.5.110.0232.40720.12
5.5.100.0002.41320.22
5.5.90.0202.41720.19
5.5.80.0172.44720.12
5.5.70.0602.40720.17
5.5.60.0232.43720.17
5.5.50.0202.41320.07
5.5.40.0432.32320.13
5.5.30.0332.40720.02
5.5.20.0302.39020.22
5.5.10.0232.39720.10
5.5.00.0132.45020.03
5.4.450.0002.47019.38
5.4.440.0132.45319.54
5.4.430.0272.44719.35
5.4.420.0532.36019.23
5.4.410.0072.48019.26
5.4.400.0332.38718.86
5.4.390.0072.44319.07
5.4.380.0232.43719.02
5.4.370.0232.42319.06
5.4.360.0232.43318.86
5.4.350.0172.44319.04
5.4.340.0232.42318.85
5.4.320.0232.43018.91
5.4.310.0132.44318.85
5.4.300.0632.39318.90
5.4.290.0302.41318.85
5.4.280.0272.39319.02
5.4.270.0302.39319.07
5.4.260.0432.41719.09
5.4.250.0432.38719.09
5.4.240.0332.43319.04
5.4.230.0332.41018.90
5.4.220.0072.46719.04
5.4.210.0302.42719.02
5.4.200.0372.40019.06
5.4.190.0202.43719.01
5.4.180.0172.37018.89
5.4.170.0232.46019.09
5.4.160.0302.38019.20
5.4.150.0202.41718.87
5.4.140.0202.43716.32
5.4.130.0202.43716.43
5.4.120.0502.42316.50
5.4.110.0272.43716.48
5.4.100.0132.42316.30
5.4.90.0302.36316.40
5.4.80.0172.34716.45
5.4.70.0072.42016.45
5.4.60.0272.39316.50
5.4.50.0132.44016.27
5.4.40.0102.44716.30
5.4.30.0202.43716.41
5.4.20.0102.44716.48
5.4.10.0132.41316.47
5.4.00.0272.38015.84
5.3.290.0272.40014.47
5.3.280.0102.43314.45
5.3.270.0232.43014.42
5.3.260.0372.42014.46
5.3.250.0172.42014.47
5.3.240.0302.40014.46
5.3.230.0272.41014.47
5.3.220.0232.39714.42
5.3.210.0232.45014.41
5.3.200.0272.43014.40
5.3.190.0402.36014.42
5.3.180.0132.39714.39
5.3.170.0332.41314.54
5.3.160.0302.39714.38
5.3.150.0232.43014.24
5.3.140.0302.42014.39
5.3.130.0172.43714.42
5.3.120.0372.42714.42
5.3.110.0202.41314.32
5.3.100.0302.38313.86
5.3.90.0372.43313.83
5.3.80.0132.39313.90
5.3.70.0172.43013.85
5.3.60.0072.43313.89
5.3.50.0372.44713.70
5.3.40.0202.41713.76
5.3.30.0332.44013.67
5.3.20.0232.45713.55
5.3.10.0432.37013.48
5.3.00.0202.39313.50
5.2.170.0202.44010.88
5.2.160.0302.40710.94
5.2.150.0402.40310.86
5.2.140.0132.35310.96
5.2.130.0132.42010.92
5.2.120.0332.42010.92
5.2.110.0272.40710.97
5.2.100.0202.39310.97
5.2.90.0172.42310.86
5.2.80.0032.43310.93
5.2.70.0132.47010.76
5.2.60.0202.44010.87
5.2.50.0102.45710.98
5.2.40.0372.45010.69
5.2.30.0232.40310.76
5.2.20.0232.40310.79
5.2.10.0272.44010.73
5.2.00.0232.42710.58
5.1.60.0372.4009.84
5.1.50.0132.4379.90
5.1.40.0202.4439.86
5.1.30.0202.44010.18
5.1.20.0402.38710.14
5.1.10.0132.4309.84
5.1.00.0132.4209.94
5.0.50.0202.4138.36
5.0.40.0132.4408.23
5.0.30.0132.4207.95
5.0.20.0402.4208.00
5.0.10.0072.4307.94
5.0.00.0072.4408.00
4.4.90.0202.4277.94
4.4.80.0132.4577.94
4.4.70.0172.4507.94
4.4.60.0202.4477.94
4.4.50.0072.4477.94
4.4.40.0372.4307.94
4.4.30.0302.4207.94
4.4.20.0132.4137.94
4.4.10.0232.4507.94
4.4.00.0332.4377.94
4.3.110.0102.4507.94
4.3.100.0072.4407.94
4.3.90.0302.4537.94
4.3.80.0302.4537.94
4.3.70.0002.4207.94
4.3.60.0172.4407.94
4.3.50.0132.4207.94
4.3.40.0102.4337.94
4.3.30.0232.4377.94
4.3.20.0132.4437.94
4.3.10.0172.4407.94
4.3.00.0072.4377.94

preferences:
34.28 ms | 401 KiB | 5 Q