3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pswd = "A1Q1@pa"; $letterStart = preg_match("/^[A-Za-z]/", $pswd); // start with a letter $specialChar= preg_match("/(?=.*[!@#&*%]+)/", $pswd); // one or more special chars in list $numberChar= preg_match("/(?=.*[0-9]\d{2,})/)", $pswd); //two or more digits x $upperChar= preg_match("/(?=.*[A-Z]\w\S{2,})/", $pswd); //two or more upper case letters $lowerChar= preg_match("/(?=.*[a-z]\w\S{2,})/", $pswd); //two or more lower case letters x $pswdLength = preg_match("/(?=^.{6,20}$)/", $pswd); //length of pswd between min and max echo $letterStart . " " . $specialChar . " " . $numberChar . " " . $upperChar . " " . $lowerChar . " " . $pswdLength;

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.0170.00717.13
8.3.50.0070.01122.09
8.3.40.0100.00619.24
8.3.30.0130.00918.92
8.3.20.0070.00020.36
8.3.10.0030.00523.68
8.3.00.0040.00419.51
8.2.180.0060.01217.00
8.2.170.0040.01122.96
8.2.160.0030.01120.52
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0000.00822.37
8.2.110.0060.00321.25
8.2.100.0130.00017.97
8.2.90.0000.01217.95
8.2.80.0040.00418.04
8.2.70.0050.00317.93
8.2.60.0040.00418.09
8.2.50.0030.00618.10
8.2.40.0040.00420.20
8.2.30.0000.00818.12
8.2.20.0030.00517.81
8.2.10.0000.00818.18
8.2.00.0040.00417.93
8.1.280.0060.01325.92
8.1.270.0060.00322.22
8.1.260.0000.00826.35
8.1.250.0020.00528.09
8.1.240.0090.00023.78
8.1.230.0080.00321.02
8.1.220.0050.00317.91
8.1.210.0030.00518.88
8.1.200.0060.00317.50
8.1.190.0030.00517.38
8.1.180.0040.00418.10
8.1.170.0090.00018.90
8.1.160.0000.00822.12
8.1.150.0070.00018.95
8.1.140.0030.00517.67
8.1.130.0000.00817.81
8.1.120.0020.00517.70
8.1.110.0030.00617.55
8.1.100.0040.00417.61
8.1.90.0060.00417.70
8.1.80.0000.00817.64
8.1.70.0000.00717.65
8.1.60.0030.01017.77
8.1.50.0050.00317.61
8.1.40.0030.00517.59
8.1.30.0000.00817.77
8.1.20.0040.00417.82
8.1.10.0040.00417.58
8.1.00.0050.00317.63
8.0.300.0030.00520.02
8.0.290.0080.00017.00
8.0.280.0030.00318.39
8.0.270.0030.00317.20
8.0.260.0000.00617.20
8.0.250.0000.00717.30
8.0.240.0000.00717.15
8.0.230.0070.00017.18
8.0.220.0030.00317.22
8.0.210.0030.00517.21
8.0.200.0000.00717.25
8.0.190.0060.00317.30
8.0.180.0070.00017.24
8.0.170.0040.00417.18
8.0.160.0070.00017.19
8.0.150.0040.00417.11
8.0.140.0070.00017.21
8.0.130.0000.00513.69
8.0.120.0050.00317.05
8.0.110.0050.00317.12
8.0.100.0030.00517.23
8.0.90.0070.00017.04
8.0.80.0150.00617.26
8.0.70.0000.00717.21
8.0.60.0070.00017.27
8.0.50.0040.00417.11
8.0.30.0130.01117.25
8.0.20.0130.00817.46
8.0.10.0000.00717.17
8.0.00.0090.00917.07
7.4.330.0030.00315.02
7.4.320.0040.00416.70
7.4.300.0040.00416.73
7.4.290.0060.00016.73
7.4.280.0040.00416.75
7.4.270.0030.00316.65
7.4.260.0000.00716.73
7.4.250.0040.00416.82
7.4.240.0040.00416.78
7.4.230.0000.00716.85
7.4.220.0060.01216.83
7.4.210.0070.01016.63
7.4.200.0000.00716.88
7.4.160.0070.01016.73
7.4.150.0080.00917.40
7.4.140.0130.00917.86
7.4.130.0060.01616.72
7.4.120.0100.00716.84
7.4.110.0100.00916.88
7.4.100.0130.00416.64
7.4.90.0110.00816.70
7.4.80.0040.01419.39
7.4.70.0070.01516.79
7.4.60.0040.01416.70
7.4.50.0030.00616.52
7.4.40.0070.01016.70
7.4.30.0040.01316.56
7.4.00.0000.01415.13
7.3.330.0030.00313.31
7.3.320.0000.00513.40
7.3.310.0050.00316.57
7.3.300.0030.00316.48
7.3.290.0020.01416.56
7.3.280.0100.00816.57
7.3.270.0040.01317.40
7.3.260.0060.01216.66
7.3.250.0080.00916.51
7.3.240.0140.00716.52
7.3.230.0140.00716.63
7.3.210.0090.00916.50
7.3.200.0090.01219.39
7.3.190.0110.00616.60
7.3.180.0080.00816.66
7.3.170.0090.00616.73
7.3.160.0060.01016.56
7.3.10.0030.01116.78
7.3.00.0030.00816.74
7.2.330.0040.01416.66
7.2.320.0100.00716.80
7.2.310.0090.00916.85
7.2.300.0030.01816.82
7.2.290.0080.01116.93
7.2.130.0070.00716.99
7.2.120.0030.01417.10
7.2.110.0110.00416.76
7.2.100.0000.00917.16
7.2.90.0110.00416.81
7.2.80.0060.00917.28
7.2.70.0030.00617.05
7.2.60.0110.00317.19
7.2.50.0100.00317.18
7.2.40.0000.01017.07
7.2.30.0060.00617.14
7.2.20.0000.00817.02
7.2.10.0060.00616.91
7.2.00.0000.01417.23
7.1.250.0040.00716.06
7.1.200.0110.00015.90
7.1.70.0000.00717.15
7.1.60.0000.02519.11
7.1.50.0200.00317.00
7.1.00.0030.07722.39
7.0.200.0000.01116.84
7.0.140.0070.07022.00
7.0.60.0100.08019.95
7.0.50.0030.08317.91
7.0.40.0070.06020.07
7.0.30.0270.04320.04
7.0.20.0400.06720.32
7.0.10.0100.06320.32
7.0.00.0070.05319.98
5.6.280.0000.07721.12
5.6.210.0030.04720.47
5.6.200.0100.04718.11
5.6.190.0030.04320.67
5.6.180.0270.05720.57
5.6.170.1030.04020.44
5.6.160.0070.08320.46
5.6.150.0070.07318.20
5.6.140.0130.07718.14
5.6.130.0030.07718.11
5.6.120.0130.08020.74
5.6.110.0070.07021.11
5.6.100.0100.08321.08
5.6.90.0070.05321.01
5.6.80.0130.03720.39
5.5.350.0130.05320.42
5.5.340.0100.08018.02
5.5.330.0030.04720.07
5.5.320.0300.05320.23
5.5.310.0270.04720.21
5.5.300.0030.04017.93
5.5.290.0070.04717.90
5.5.280.0100.07720.76
5.5.270.0100.08320.63
5.5.260.0000.04320.76
5.5.250.0030.05720.64
5.5.240.0170.06320.21
5.4.450.0570.07019.46
5.4.440.0930.05719.61
5.4.430.0870.04019.29
5.4.420.0630.00019.45
5.4.410.0630.00019.31
5.4.400.0770.00019.20
5.4.390.0630.00019.16
5.4.380.0630.00019.00
5.4.370.0630.00019.04
5.4.360.0600.00019.16
5.4.350.0670.00019.06
5.4.340.0070.03411.97
5.4.320.0070.04712.46
5.4.310.0080.04612.45
5.4.300.0080.04012.46
5.4.290.0100.05112.45
5.4.280.0090.04712.35
5.4.270.0070.03712.35
5.4.260.0100.05112.35
5.4.250.0120.05212.35
5.4.240.0060.04712.35
5.4.230.0060.05612.34
5.4.220.0130.06312.34
5.4.210.0160.06712.34
5.4.200.0100.06112.34
5.4.190.0090.05812.34
5.4.180.0100.05412.34
5.4.170.0110.04312.35
5.4.160.0120.04512.34
5.4.150.0130.05212.34
5.4.140.0080.05912.02
5.4.130.0110.05212.01
5.4.120.0090.04411.97
5.4.110.0080.05011.96
5.4.100.0090.03311.96
5.4.90.0060.03611.96
5.4.80.0120.03411.97
5.4.70.0070.03311.96
5.4.60.0060.03511.96
5.4.50.0030.03711.97
5.4.40.0050.03411.95
5.4.30.0060.03511.95
5.4.20.0070.03311.95
5.4.10.0060.04211.95
5.4.00.0030.03811.44
5.3.290.0090.03612.80
5.3.280.0040.03912.71
5.3.270.0110.04012.73
5.3.260.0050.04012.72
5.3.250.0040.04212.72
5.3.240.0050.03812.72
5.3.230.0070.03712.71
5.3.220.0040.03912.68
5.3.210.0060.03912.68
5.3.200.0060.03512.68
5.3.190.0040.03912.68
5.3.180.0070.03512.67
5.3.170.0070.03612.67
5.3.160.0040.03912.67
5.3.150.0050.03712.67
5.3.140.0060.03712.66
5.3.130.0090.03912.66
5.3.120.0070.04612.66
5.3.110.0050.04512.66
5.3.100.0070.03712.12
5.3.90.0050.03812.08
5.3.80.0060.03612.07
5.3.70.0080.03412.08
5.3.60.0100.03412.06
5.3.50.0060.03912.00
5.3.40.0050.04712.00
5.3.30.0060.03711.95
5.3.20.0050.03611.73
5.3.10.0080.03311.70
5.3.00.0020.04111.69
5.2.170.0030.0329.19
5.2.160.0040.0309.19
5.2.150.0090.0269.19
5.2.140.0050.0309.18
5.2.130.0070.0279.15
5.2.120.0050.0289.14
5.2.110.0040.0299.16
5.2.100.0060.0279.15
5.2.90.0060.0289.15
5.2.80.0050.0309.14
5.2.70.0020.0349.14
5.2.60.0070.0419.10
5.2.50.0060.0409.07
5.2.40.0060.0349.05
5.2.30.0050.0319.02
5.2.20.0040.0299.02
5.2.10.0040.0298.93
5.2.00.0020.0318.80
5.1.60.0050.0238.08
5.1.50.0000.0308.08
5.1.40.0040.0258.06
5.1.30.0040.0268.41
5.1.20.0030.0288.43
5.1.10.0030.0278.16
5.1.00.0040.0318.15
5.0.50.0050.0216.64
5.0.40.0050.0206.51
5.0.30.0040.0306.31
5.0.20.0010.0226.28
5.0.10.0020.0216.26
5.0.00.0040.0306.26
4.4.90.0040.0144.78
4.4.80.0040.0164.76
4.4.70.0040.0154.76
4.4.60.0010.0174.76
4.4.50.0020.0154.77
4.4.40.0010.0274.71
4.4.30.0020.0164.76
4.4.20.0030.0154.85
4.4.10.0030.0154.85
4.4.00.0030.0244.76
4.3.110.0030.0154.66
4.3.100.0040.0144.66
4.3.90.0020.0154.64
4.3.80.0030.0244.59
4.3.70.0040.0134.63
4.3.60.0030.0154.63
4.3.50.0030.0164.63
4.3.40.0040.0264.54
4.3.30.0010.0173.30
4.3.20.0030.0153.28
4.3.10.0020.0163.23
4.3.00.0100.0237.55

preferences:
63.96 ms | 401 KiB | 5 Q