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]{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.0110.01116.88
8.3.50.0130.00822.14
8.3.40.0070.01018.91
8.3.30.0060.01019.00
8.3.20.0000.00820.34
8.3.10.0080.00023.64
8.3.00.0040.00419.38
8.2.180.0040.01117.00
8.2.170.0170.00322.96
8.2.160.0130.00720.35
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00422.18
8.2.110.0080.00022.29
8.2.100.0120.00017.75
8.2.90.0000.00819.28
8.2.80.0040.00417.97
8.2.70.0030.00617.73
8.2.60.0090.00317.80
8.2.50.0030.00618.07
8.2.40.0000.00818.28
8.2.30.0030.00618.11
8.2.20.0050.00317.87
8.2.10.0030.00518.23
8.2.00.0030.00518.00
8.1.280.0160.00925.92
8.1.270.0130.00322.32
8.1.260.0080.00026.35
8.1.250.0050.00228.09
8.1.240.0060.00323.89
8.1.230.0080.00417.60
8.1.220.0040.00417.75
8.1.210.0060.00318.77
8.1.200.0090.00017.48
8.1.190.0040.00417.48
8.1.180.0000.00818.10
8.1.170.0050.00318.77
8.1.160.0030.00522.02
8.1.150.0040.00418.93
8.1.140.0070.00017.68
8.1.130.0070.00017.93
8.1.120.0030.00517.66
8.1.110.0060.00317.71
8.1.100.0000.00817.68
8.1.90.0090.00017.54
8.1.80.0080.00017.61
8.1.70.0040.00417.54
8.1.60.0050.00517.79
8.1.50.0000.00817.75
8.1.40.0020.00517.70
8.1.30.0040.00417.80
8.1.20.0080.00017.67
8.1.10.0070.00017.71
8.1.00.0040.00417.49
8.0.300.0040.00418.77
8.0.290.0090.00017.13
8.0.280.0000.00818.48
8.0.270.0030.00317.17
8.0.260.0000.00617.31
8.0.250.0050.00217.22
8.0.240.0000.00717.28
8.0.230.0070.00017.23
8.0.220.0030.00317.24
8.0.210.0070.00017.08
8.0.200.0000.00717.25
8.0.190.0070.00317.28
8.0.180.0000.00717.25
8.0.170.0000.00817.22
8.0.160.0070.00017.29
8.0.150.0000.00717.18
8.0.140.0040.00417.13
8.0.130.0000.00513.58
8.0.120.0000.00817.09
8.0.110.0080.00017.11
8.0.100.0000.00717.06
8.0.90.0050.00217.24
8.0.80.0130.00917.19
8.0.70.0080.00017.16
8.0.60.0040.00417.01
8.0.50.0040.00417.24
8.0.30.0140.00917.33
8.0.20.0110.00817.44
8.0.10.0030.00617.31
8.0.00.0080.01016.91
7.4.330.0020.00215.02
7.4.320.0030.00316.89
7.4.300.0030.00316.85
7.4.290.0070.00016.85
7.4.280.0030.00616.82
7.4.270.0030.00316.84
7.4.260.0050.00216.82
7.4.250.0000.00816.72
7.4.240.0070.00016.82
7.4.230.0040.00416.86
7.4.220.0130.00616.61
7.4.210.0070.01016.79
7.4.200.0070.00016.62
7.4.160.0060.00916.66
7.4.150.0120.00917.40
7.4.140.0120.01017.86
7.4.130.0140.00416.68
7.4.120.0070.00916.73
7.4.110.0100.00716.83
7.4.100.0060.01216.60
7.4.90.0100.00716.77
7.4.80.0090.00919.39
7.4.70.0120.00916.58
7.4.60.0220.00016.74
7.4.50.0040.00416.57
7.4.40.0100.00716.73
7.4.30.0140.00416.83
7.4.00.0090.00615.33
7.3.330.0020.00213.36
7.3.320.0000.00613.38
7.3.310.0090.00016.51
7.3.300.0030.00316.55
7.3.290.0090.00816.58
7.3.280.0070.01116.59
7.3.270.0140.00317.40
7.3.260.0120.00616.49
7.3.250.0140.00816.64
7.3.240.0100.01416.66
7.3.230.0030.01416.82
7.3.210.0060.01316.61
7.3.200.0100.01019.39
7.3.190.0120.00616.60
7.3.180.0090.00616.73
7.3.170.0100.00616.67
7.3.160.0190.00316.70
7.2.330.0090.00916.84
7.2.320.0080.00917.06
7.2.310.0060.01616.71
7.2.300.0090.01016.81
7.2.290.0130.00716.84
7.1.70.0030.00517.39
7.1.60.0070.01819.11
7.1.50.0070.01517.07
7.1.00.0070.06722.48
7.0.200.0000.01016.75
7.0.140.0070.07321.97
7.0.60.0070.07720.06
7.0.50.0130.03317.69
7.0.40.0070.05320.09
7.0.30.0400.07020.19
7.0.20.0400.07020.20
7.0.10.0130.08320.14
7.0.00.0100.04720.25
5.6.280.0030.07320.92
5.6.210.0030.04020.64
5.6.200.0070.08018.22
5.6.190.0070.04020.60
5.6.180.0330.07720.37
5.6.170.1130.04320.52
5.6.160.0130.03720.61
5.6.150.0130.08018.17
5.6.140.0070.05018.15
5.6.130.0070.08018.17
5.6.120.0100.05020.93
5.6.110.0130.06321.11
5.6.100.0030.05720.88
5.6.90.0030.09320.98
5.6.80.0000.04020.36
5.5.350.0200.07720.29
5.5.340.0000.07718.02
5.5.330.0000.08720.21
5.5.320.0370.04020.50
5.5.310.0300.06020.27
5.5.300.0030.04017.94
5.5.290.0030.06717.99
5.5.280.0130.08020.87
5.5.270.0100.08320.75
5.5.260.0030.04320.76
5.5.250.0070.04320.71
5.5.240.0200.07720.22
5.4.450.0070.06019.30
5.4.440.0770.05719.46
5.4.430.0900.05319.13
5.4.420.0630.00019.30
5.4.410.0630.00019.04
5.4.400.0630.00019.13
5.4.390.0700.00018.96
5.4.380.0630.00018.96
5.4.370.0600.00018.95
5.4.360.0600.00018.96
5.4.350.0630.00018.96
5.4.340.0060.04011.97
5.4.320.0050.03912.46
5.4.310.0070.03812.46
5.4.300.0090.03512.45
5.4.290.0110.04312.46
5.4.280.0040.04312.35
5.4.270.0050.03912.35
5.4.260.0070.04212.35
5.4.250.0070.03612.35
5.4.240.0040.03812.35
5.4.230.0060.03812.34
5.4.220.0020.04712.34
5.4.210.0070.03712.34
5.4.200.0080.03812.34
5.4.190.0140.05212.34
5.4.180.0060.05112.34
5.4.170.0050.03912.35
5.4.160.0070.03412.34
5.4.150.0040.03712.34
5.4.140.0050.03712.02
5.4.130.0040.03912.02
5.4.120.0060.04411.97
5.4.110.0040.04111.96
5.4.100.0090.04311.96
5.4.90.0080.04111.96
5.4.80.0030.04311.96
5.4.70.0030.03811.96
5.4.60.0110.04111.96
5.4.50.0040.04111.96
5.4.40.0080.03411.95
5.4.30.0070.03511.95
5.4.20.0040.03911.95
5.4.10.0070.03311.95
5.4.00.0070.03411.44
5.3.290.0090.03812.80
5.3.280.0070.03612.71
5.3.270.0050.04012.72
5.3.260.0040.04012.72
5.3.250.0050.03712.72
5.3.240.0070.04012.72
5.3.230.0050.03712.71
5.3.220.0050.03712.68
5.3.210.0090.03912.68
5.3.200.0050.03812.68
5.3.190.0040.04012.68
5.3.180.0110.03312.67
5.3.170.0090.04112.67
5.3.160.0050.03912.68
5.3.150.0080.03712.67
5.3.140.0060.03712.66
5.3.130.0100.03512.66
5.3.120.0070.03912.66
5.3.110.0070.03912.66
5.3.100.0060.03912.11
5.3.90.0070.03812.08
5.3.80.0060.03812.07
5.3.70.0060.03712.07
5.3.60.0030.03912.07
5.3.50.0070.03912.00
5.3.40.0080.04212.00
5.3.30.0040.04111.96
5.3.20.0040.04011.73
5.3.10.0050.03511.70
5.3.00.0060.03611.69
5.2.170.0040.0309.19
5.2.160.0040.0309.19
5.2.150.0050.0349.19
5.2.140.0030.0379.18
5.2.130.0040.0359.15
5.2.120.0060.0299.14
5.2.110.0060.0299.15
5.2.100.0070.0299.15
5.2.90.0070.0289.15
5.2.80.0050.0339.15
5.2.70.0040.0319.14
5.2.60.0040.0369.10
5.2.50.0060.0339.07
5.2.40.0020.0339.05
5.2.30.0050.0309.02
5.2.20.0040.0299.01
5.2.10.0050.0278.94
5.2.00.0040.0318.80
5.1.60.0060.0248.09
5.1.50.0040.0278.08
5.1.40.0000.0288.06
5.1.30.0030.0288.41
5.1.20.0030.0338.43
5.1.10.0030.0298.15
5.1.00.0070.0268.15
5.0.50.0020.0226.64
5.0.40.0050.0206.50
5.0.30.0020.0336.31
5.0.20.0020.0216.29
5.0.10.0040.0266.26
5.0.00.0030.0326.25
4.4.90.0030.0154.78
4.4.80.0030.0154.76
4.4.70.0040.0154.75
4.4.60.0040.0154.75
4.4.50.0050.0164.77
4.4.40.0040.0244.70
4.4.30.0040.0174.76
4.4.20.0040.0174.84
4.4.10.0030.0164.84
4.4.00.0030.0254.76
4.3.110.0030.0154.67
4.3.100.0030.0154.67
4.3.90.0030.0174.64
4.3.80.0020.0254.59
4.3.70.0030.0144.63
4.3.60.0020.0154.63
4.3.50.0030.0164.63
4.3.40.0050.0234.54
4.3.30.0010.0173.31
4.3.20.0020.0163.29
4.3.10.0010.0163.23
4.3.00.0030.0207.56

preferences:
41.58 ms | 401 KiB | 5 Q