3v4l.org

run code in 300+ PHP versions simultaneously
<?php $length = $_GET['length']?:8; $alpa = "abcdefghijklmnopqrstuvwxyz";$alpa.=strtoupper($alpa); $alpa.="1234567890";$alpa=str_split($alpa); $pass=""; foreach($alpa as $a){ $pass.=str_repeat($a,floor(sqrt(max(rand(0,$length*$length),0)))); } $pass = str_split($pass);shuffle($pass);$pass=implode($pass); $r = rand(0,strlen($pass)-$length); echo substr($pass,$r,$length);

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.4.00.0100.00815.07
7.3.120.0110.00714.99
7.3.110.0070.01215.00
7.3.100.0060.01114.81
7.3.90.0080.00615.05
7.3.80.0060.01014.95
7.3.70.0060.00914.86
7.3.60.0070.00714.97
7.3.50.0090.00514.80
7.3.40.0050.01014.93
7.3.30.0060.01114.94
7.3.20.0100.00416.74
7.3.10.0040.00816.61
7.3.00.0080.00616.70
7.2.250.0080.01214.89
7.2.240.0110.00815.13
7.2.230.0040.01215.01
7.2.220.0070.00615.10
7.2.210.0080.00615.22
7.2.200.0070.00715.23
7.2.190.0020.01515.01
7.2.180.0070.00815.05
7.2.170.0100.00715.06
7.2.160.0080.00515.13
7.2.150.0050.01016.76
7.2.140.0050.01017.04
7.2.130.0080.00816.98
7.2.120.0050.01016.86
7.2.110.0030.01316.77
7.2.100.0080.00916.83
7.2.90.0100.00516.91
7.2.80.0030.01316.78
7.2.70.0070.00716.99
7.2.60.0080.00616.71
7.2.50.0070.00716.82
7.2.40.0070.00716.75
7.2.30.0030.01116.87
7.2.20.0070.00717.04
7.2.10.0050.01116.82
7.2.00.0070.01017.60
7.1.330.0100.00615.75
7.1.320.0070.01115.84
7.1.310.0030.01215.84
7.1.300.0030.01015.62
7.1.290.0080.00315.67
7.1.280.0100.00515.79
7.1.270.0030.01315.89
7.1.260.0040.00915.78
7.1.250.0060.00915.83
7.1.240.0040.00815.85
7.1.230.0050.01115.62
7.1.220.0090.00415.72
7.1.210.0070.00815.78
7.1.200.0080.00415.73
7.1.190.0050.00915.90
7.1.180.0060.00815.66
7.1.170.0090.00515.80
7.1.160.0040.01015.84
7.1.150.0100.00215.80
7.1.140.0060.00615.71
7.1.130.0110.00115.91
7.1.120.0050.01115.63
7.1.110.0030.01015.92
7.1.100.0090.00315.73
7.1.90.0070.00815.79
7.1.80.0080.00915.92
7.1.70.0090.00316.38
7.1.60.0070.00817.10
7.1.50.0020.01316.08
7.1.40.0100.00215.75
7.1.30.0110.00415.77
7.1.20.0060.00815.83
7.1.10.0080.00315.91
7.1.00.0060.02817.98
7.0.330.0060.00615.32
7.0.320.0050.00715.40
7.0.310.0080.00715.35
7.0.300.0070.00515.42
7.0.290.0050.00915.21
7.0.280.0020.01115.50
7.0.270.0090.00415.12
7.0.260.0090.00615.50
7.0.250.0040.00715.44
7.0.240.0070.00215.44
7.0.230.0050.00915.27
7.0.220.0100.00615.31
7.0.210.0100.00515.24
7.0.200.0060.00815.91
7.0.190.0080.00815.48
7.0.180.0070.00815.48
7.0.170.0040.00915.60
7.0.160.0050.00515.40
7.0.150.0070.00415.31
7.0.140.0060.02917.67
7.0.130.0080.00415.37
7.0.120.0050.00815.46
7.0.110.0100.00515.44
7.0.100.0070.00615.47
7.0.90.0060.00715.45
7.0.80.0080.00515.53
7.0.70.0030.01115.42
7.0.60.0060.03416.92
7.0.50.0040.02016.32
7.0.40.0050.03715.67
7.0.30.0230.02715.80
7.0.20.0070.01915.64
7.0.10.0040.01915.71
7.0.00.0080.03315.65
5.6.400.0080.00814.46
5.6.390.0030.00914.54
5.6.380.0040.01114.55
5.6.370.0090.00614.50
5.6.360.0080.00314.47
5.6.350.0020.01414.49
5.6.340.0030.00914.50
5.6.330.0060.00914.43
5.6.320.0020.01014.47
5.6.310.0050.00714.53
5.6.300.0060.00814.30
5.6.290.0080.00514.50
5.6.280.0110.02216.64
5.6.270.0080.00714.38
5.6.260.0110.00314.46
5.6.250.0070.00814.23
5.6.240.0090.00514.41
5.6.230.0060.00714.28
5.6.220.0060.00814.55
5.6.210.0040.01816.51
5.6.200.0050.03615.72
5.6.190.0070.02316.46
5.6.180.0140.02516.48
5.6.170.0110.02516.41
5.6.160.0060.02116.44
5.6.150.0050.03115.54
5.6.140.0070.03415.69
5.6.130.0060.02215.73
5.6.120.0050.02516.46
5.6.110.0050.03216.58
5.6.100.0070.03316.71
5.6.90.0040.02916.53
5.6.80.0090.03116.25
5.6.70.1510.02016.43
5.6.60.0030.00914.33
5.6.50.0050.01114.41
5.6.40.0020.01514.08
5.6.30.0070.01014.45
5.6.20.0060.00714.19
5.6.10.0070.00814.47
5.6.00.0090.00614.24
5.5.380.0030.01214.28
5.5.370.0080.00514.20
5.5.360.0070.00714.26
5.5.350.0020.03616.37
5.5.340.0090.02515.43
5.5.330.0080.02816.35
5.5.320.0050.01716.32
5.5.310.0160.01816.20
5.5.300.0070.03315.55
5.5.290.0060.02715.65
5.5.280.0040.02116.42
5.5.270.0050.01916.79
5.5.260.0100.03216.52
5.5.250.0100.02816.42
5.5.240.0060.02216.18
5.5.230.0050.00714.19
5.5.220.0050.00914.15
5.5.210.0070.00914.37
5.5.200.0050.00514.21
5.5.190.0030.01014.27
5.5.180.0080.00614.36
5.5.170.0030.00814.33
5.5.160.0020.01014.18
5.5.150.0060.00314.19
5.5.140.0020.01214.46
5.5.130.0080.00714.13
5.5.120.0070.00914.47
5.5.110.0050.01014.32
5.5.100.0040.01114.50
5.5.90.0050.00814.29
5.5.80.0060.00614.07
5.5.70.0050.01114.27
5.5.60.0050.01214.16
5.5.50.0080.00714.02
5.5.40.0100.00514.32
5.5.30.0060.01014.27
5.5.20.0100.00514.18
5.5.10.0070.00614.32
5.5.00.0110.00614.09
5.4.450.0260.02314.08
5.4.440.0260.02214.22
5.4.430.0400.03214.23
5.4.420.0070.02214.23
5.4.410.0380.02314.11
5.4.400.0380.02014.21
5.4.390.0320.02114.01
5.4.380.0070.02213.96
5.4.370.0050.02413.96
5.4.360.0070.02113.99
5.4.350.0050.02513.86
5.4.340.0090.02013.87
5.4.330.0040.00611.63
5.4.320.0060.01411.95
5.4.310.0030.02012.00
5.4.300.0030.01811.92
5.4.290.0030.01911.92
5.4.280.0030.02011.79
5.4.270.0020.01611.87
5.4.260.0050.01611.78
5.4.250.0050.01611.87
5.4.240.0050.01711.78
5.4.230.0060.01611.89
5.4.220.0030.01711.90
5.4.210.0040.01911.80
5.4.200.0050.01811.81
5.4.190.0040.01711.79
5.4.180.0050.01911.81
5.4.170.0070.01511.77
5.4.160.0070.01411.74
5.4.150.0060.01711.87
5.4.140.0080.01411.74
5.4.130.0030.01811.67
5.4.120.0040.01911.73
5.4.110.0040.01811.72
5.4.100.0080.01511.83
5.4.90.0030.01911.80
5.4.80.0040.02011.85
5.4.70.0060.01511.80
5.4.60.0030.01711.70
5.4.50.0040.01811.69
5.4.40.0050.01611.74
5.4.30.0060.01411.77
5.4.20.0010.02111.77
5.4.10.0050.01911.78
5.4.00.0050.01711.61
5.3.290.0020.02011.86
5.3.280.0070.01611.81
5.3.270.0080.01611.74
5.3.260.0080.01811.75
5.3.250.0060.01611.84
5.3.240.0040.01811.81
5.3.230.0030.01911.80
5.3.220.0070.01411.75
5.3.210.0030.01811.77
5.3.200.0060.01711.77
5.3.190.0050.01711.83
5.3.180.0080.01511.84
5.3.170.0060.01611.83
5.3.160.0040.01711.83
5.3.150.0050.01511.83
5.3.140.0040.02011.83
5.3.130.0060.01711.81
5.3.120.0060.01811.81
5.3.110.0070.01711.85
5.3.100.0050.01811.63
5.3.90.0040.01611.61
5.3.80.0070.01511.59
5.3.70.0060.01611.58
5.3.60.0040.01911.59
5.3.50.0040.01811.54
5.3.40.0060.01711.50
5.3.30.0070.01511.57
5.3.20.0040.01811.46
5.3.10.0040.01411.43
5.3.00.0040.01611.38
5.2.170.0040.0309.18
5.2.160.0080.0259.18
5.2.150.0050.0309.18
5.2.140.0070.0299.18
5.2.130.0030.0319.14
5.2.120.0050.0289.14
5.2.110.0030.0309.14
5.2.100.0040.0289.14
5.2.90.0040.0359.14
5.2.80.0050.0319.13
5.2.70.0070.0289.14
5.2.60.0050.0299.09
5.2.50.0090.0259.06
5.2.40.0030.0299.04
5.2.30.0070.0279.01
5.2.20.0030.0319.00
5.2.10.0030.0308.93
5.2.00.0060.0338.79
5.1.60.0030.0258.07
5.1.50.0060.0238.07
5.1.40.0060.0238.05
5.1.30.0070.0248.40
5.1.20.0020.0298.41
5.1.10.0040.0268.14
5.1.00.0060.0248.14
5.0.50.0040.0206.62
5.0.40.0080.0216.48
5.0.30.0060.0306.29
5.0.20.0060.0186.26
5.0.10.0040.0196.24
5.0.00.0030.0316.23
4.4.90.0020.0174.78
4.4.80.0040.0154.75
4.4.70.0040.0194.75
4.4.60.0010.0174.75
4.4.50.0020.0154.77
4.4.40.0040.0244.71
4.4.30.0010.0174.76
4.4.20.0010.0204.84
4.4.10.0030.0194.85
4.4.00.0040.0264.76
4.3.110.0050.0154.67
4.3.100.0020.0164.67
4.3.90.0010.0164.63
4.3.80.0020.0254.58
4.3.70.0000.0174.63
4.3.60.0010.0164.63
4.3.50.0010.0174.63
4.3.40.0010.0264.54
4.3.30.0030.0153.28
4.3.20.0030.0153.26
4.3.10.0040.0133.22
4.3.00.0000.0277.44

preferences:
40.81 ms | 404 KiB | 6 Q