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); $password = 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.0120.00614.63
7.3.120.0070.01115.11
7.3.110.0090.00914.93
7.3.100.0030.01015.05
7.3.90.0000.01214.91
7.3.80.0030.00715.21
7.3.70.0070.00714.84
7.3.60.0100.00714.94
7.3.50.0110.00614.95
7.3.40.0040.01214.78
7.3.30.0060.00614.77
7.3.20.0070.01016.71
7.3.10.0110.00416.71
7.3.00.0060.00316.76
7.2.250.0120.00615.09
7.2.240.0030.01714.95
7.2.230.0040.01515.05
7.2.220.0110.00415.35
7.2.210.0070.00714.90
7.2.200.0060.00915.04
7.2.190.0060.00915.29
7.2.180.0070.00315.05
7.2.170.0070.01015.18
7.1.330.0030.01015.79
7.1.320.0100.00715.48
7.1.310.0070.00715.52
7.1.300.0070.01115.89
7.1.290.0060.00915.79
7.1.280.0070.01016.00
7.1.270.0040.00815.84
7.1.260.0090.00615.69
7.1.70.0030.00717.29
7.1.60.0090.00619.46
7.1.50.0210.01134.83
7.1.00.0000.08022.30
7.0.200.0040.00416.81
7.0.140.0030.07022.05
7.0.60.0030.06019.89
7.0.50.0030.04017.90
7.0.40.0070.08020.19
7.0.30.0470.05320.18
7.0.20.0170.05720.01
7.0.10.0170.07020.18
7.0.00.0100.04320.19
5.6.280.0000.07721.13
5.6.210.0170.07320.77
5.6.200.0130.08018.21
5.6.190.0030.07720.29
5.6.180.4100.04720.34
5.6.170.0300.06320.49
5.6.160.0070.08720.68
5.6.150.0130.04718.09
5.6.140.0030.08318.10
5.6.130.0130.05018.21
5.6.120.0070.08021.03
5.6.110.0170.07721.13
5.6.100.0070.08321.14
5.6.90.0130.07721.05
5.6.80.0130.07720.39
5.6.70.0200.07320.56
5.5.350.0230.06020.47
5.5.340.0100.07018.02
5.5.330.0130.07320.21
5.5.320.0400.05320.43
5.5.310.0270.08020.19
5.5.300.0070.05017.97
5.5.290.0030.04317.99
5.5.280.0030.04020.83
5.5.270.0070.08020.98
5.5.260.0130.07720.82
5.5.250.0030.09020.72
5.5.240.0100.08320.21
5.4.450.0600.06719.65
5.4.440.1030.06019.45
5.4.430.0730.05319.40
5.4.420.0770.00019.32
5.4.410.0170.05318.98
5.4.400.0170.05318.66
5.4.390.0200.05318.76
5.4.380.0300.05018.77
5.4.370.0100.03718.79
5.4.360.0070.04318.75
5.4.350.0080.03912.07
5.4.340.0080.03312.07
5.4.320.0070.04312.54
5.4.310.0040.04512.55
5.4.300.0050.05412.55
5.4.290.0060.04612.55
5.4.280.0090.04412.45
5.4.270.0050.03912.45
5.4.260.0060.03912.45
5.4.250.0050.03912.45
5.4.240.0040.03812.45
5.4.230.0060.03912.43
5.4.220.0090.04312.44
5.4.210.0090.03312.44
5.4.200.0060.03812.45
5.4.190.0080.03512.44
5.4.180.0070.03512.44
5.4.170.0040.04012.44
5.4.160.0040.03912.45
5.4.150.0110.03212.44
5.4.140.0090.03512.13
5.4.130.0070.03512.11
5.4.120.0040.03712.07
5.4.110.0100.03212.06
5.4.100.0010.04112.07
5.4.90.0090.03512.07
5.4.80.0060.03812.07
5.4.70.0060.03712.06
5.4.60.0070.03612.06
5.4.50.0070.03412.06
5.4.40.0050.03712.05
5.4.30.0040.05412.05
5.4.20.0080.05112.04
5.4.10.0120.04712.04
5.4.00.0090.05111.53
5.3.290.0020.04412.80
5.3.280.0100.04812.73
5.3.270.0090.05812.74
5.3.260.0090.06612.75
5.3.250.0070.05512.74
5.3.240.0050.04112.74
5.3.230.0080.03612.73
5.3.220.0060.03812.71
5.3.210.0060.04012.70
5.3.200.0050.03912.70
5.3.190.0080.03712.70
5.3.180.0100.03312.71
5.3.170.0050.03812.70
5.3.160.0060.03912.71
5.3.150.0060.03712.70
5.3.140.0080.03512.69
5.3.130.0060.03812.68
5.3.120.0090.04112.69
5.3.110.0030.05112.68
5.3.100.0080.03412.16
5.3.90.0050.03712.16
5.3.80.0040.03712.14
5.3.70.0030.03912.15
5.3.60.0080.03712.13
5.3.50.0130.04112.07
5.3.40.0080.04712.08
5.3.30.0080.04512.04
5.3.20.0120.05511.82
5.3.10.0080.06511.79
5.3.00.0100.04511.77
5.2.170.0050.0309.18
5.2.160.0060.0299.18
5.2.150.0030.0349.18
5.2.140.0020.0329.18
5.2.130.0040.0299.14
5.2.120.0040.0299.14
5.2.110.0030.0319.15
5.2.100.0040.0299.14
5.2.90.0050.0299.14
5.2.80.0060.0299.14
5.2.70.0050.0309.14
5.2.60.0040.0309.10
5.2.50.0100.0269.06
5.2.40.0040.0299.04
5.2.30.0070.0299.02
5.2.20.0050.0409.00
5.2.10.0120.0248.92
5.2.00.0080.0278.79
5.1.60.0070.0228.06
5.1.50.0070.0228.07
5.1.40.0070.0238.05
5.1.30.0040.0268.40
5.1.20.0050.0268.41
5.1.10.0040.0268.14
5.1.00.0160.0228.14
5.0.50.0230.0346.62
5.0.40.0030.0206.48
5.0.30.0050.0306.29
5.0.20.0030.0206.26
5.0.10.0040.0196.24
5.0.00.0030.0316.23
4.4.90.0020.0184.77
4.4.80.0030.0154.75
4.4.70.0050.0154.76
4.4.60.0030.0174.76
4.4.50.0020.0234.77
4.4.40.0040.0314.71
4.4.30.0030.0194.76
4.4.20.0050.0134.84
4.4.10.0040.0204.85
4.4.00.0030.0284.75
4.3.110.0050.0134.67
4.3.100.0040.0134.66
4.3.90.0040.0134.63
4.3.80.0000.0264.58
4.3.70.0030.0144.63
4.3.60.0010.0164.63
4.3.50.0020.0174.62
4.3.40.0030.0244.54
4.3.30.0020.0173.28
4.3.20.0020.0173.25
4.3.10.0060.0223.22
4.3.00.0130.0237.56

preferences:
42.99 ms | 401 KiB | 5 Q