3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pswd = "A1Q@pa2"; $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].*[0-9])/", $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.0120.00618.68
8.3.50.0140.00522.11
8.3.40.0090.01218.84
8.3.30.0040.01218.95
8.3.20.0030.00520.20
8.3.10.0000.00923.64
8.3.00.0070.01119.51
8.2.180.0100.01016.88
8.2.170.0100.00722.96
8.2.160.0130.00020.35
8.2.150.0030.00624.18
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0080.00022.36
8.2.110.0060.00322.38
8.2.100.0120.00017.75
8.2.90.0030.00619.27
8.2.80.0080.00017.97
8.2.70.0040.00417.63
8.2.60.0090.00017.93
8.2.50.0050.00518.07
8.2.40.0030.00619.76
8.2.30.0050.00318.19
8.2.20.0080.00017.93
8.2.10.0040.00418.25
8.2.00.0050.00317.91
8.1.280.0170.00325.92
8.1.270.0030.00622.27
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0060.00323.98
8.1.230.0030.00917.89
8.1.220.0040.00417.91
8.1.210.0040.00418.77
8.1.200.0030.00717.35
8.1.190.0090.00017.50
8.1.180.0050.00318.10
8.1.170.0030.00618.91
8.1.160.0040.00422.12
8.1.150.0040.00418.99
8.1.140.0000.00717.63
8.1.130.0030.00317.87
8.1.120.0000.00717.69
8.1.110.0000.00717.54
8.1.100.0000.00717.54
8.1.90.0040.00417.50
8.1.80.0070.00017.60
8.1.70.0040.00417.59
8.1.60.0100.00017.80
8.1.50.0030.00617.60
8.1.40.0040.00417.68
8.1.30.0060.00317.68
8.1.20.0040.00417.85
8.1.10.0000.00717.71
8.1.00.0000.00917.54
8.0.300.0040.00418.77
8.0.290.0000.00717.13
8.0.280.0030.00318.44
8.0.270.0020.00517.37
8.0.260.0030.00517.31
8.0.250.0000.00717.17
8.0.240.0030.00317.18
8.0.230.0000.00717.07
8.0.220.0040.00417.20
8.0.210.0030.00317.14
8.0.200.0000.00617.24
8.0.190.0090.00017.24
8.0.180.0070.00017.17
8.0.170.0040.00417.14
8.0.160.0030.00317.25
8.0.150.0000.00716.98
8.0.140.0040.00417.15
8.0.130.0000.00613.55
8.0.120.0000.00817.10
8.0.110.0050.00317.07
8.0.100.0000.00816.95
8.0.90.0040.00417.05
8.0.80.0090.00617.09
8.0.70.0000.00717.04
8.0.60.0040.00417.17
8.0.50.0040.00417.13
8.0.30.0090.01017.29
8.0.20.0130.00717.44
8.0.10.0040.00417.09
8.0.00.0070.01016.99
7.4.330.0000.00515.02
7.4.320.0030.00316.67
7.4.300.0030.00316.75
7.4.290.0040.00416.65
7.4.280.0030.00616.76
7.4.270.0000.00716.86
7.4.260.0070.00016.79
7.4.250.0000.00816.83
7.4.240.0030.00416.81
7.4.230.0050.00316.63
7.4.220.0070.01016.63
7.4.210.0120.00916.79
7.4.200.0070.00016.76
7.4.160.0110.00516.80
7.4.150.0070.01717.40
7.4.140.0130.01317.86
7.4.130.0080.01416.71
7.4.120.0120.00816.62
7.4.110.0110.00716.68
7.4.100.0030.01416.79
7.4.90.0090.00916.62
7.4.80.0060.01119.39
7.4.70.0030.01316.63
7.4.60.0100.00716.70
7.4.50.0040.00416.47
7.4.40.0080.00816.70
7.4.30.0030.01316.71
7.4.00.0090.00615.21
7.3.330.0000.00513.25
7.3.320.0030.00313.25
7.3.310.0000.00716.66
7.3.300.0000.00716.39
7.3.290.0060.01016.51
7.3.280.0070.01016.52
7.3.270.0080.01217.40
7.3.260.0190.00016.51
7.3.250.0140.00316.53
7.3.240.0190.00316.68
7.3.230.0060.01116.39
7.3.210.0100.00616.74
7.3.200.0090.00919.39
7.3.190.0110.00616.72
7.3.180.0100.00716.52
7.3.170.0040.01216.72
7.3.160.0090.01216.42
7.3.10.0120.00316.81
7.3.00.0030.00916.75
7.2.330.0090.00916.70
7.2.320.0130.00916.87
7.2.310.0070.01016.60
7.2.300.0030.01516.66
7.2.290.0100.01416.81
7.2.130.0030.01016.82
7.2.120.0150.00016.93
7.2.110.0070.01017.10
7.2.100.0130.00017.14
7.2.90.0070.00717.11
7.2.80.0000.01417.27
7.2.70.0060.01317.07
7.2.60.0060.00517.17
7.2.50.0000.01316.73
7.2.40.0000.01417.27
7.2.30.0060.00317.14
7.2.20.0070.01017.26
7.2.10.0050.00816.99
7.2.00.0060.00917.17
7.1.250.0090.00616.09
7.1.200.0070.00415.94
7.1.70.0030.01017.50
7.1.60.0100.01619.11
7.1.50.0160.01017.23
7.1.00.0070.07322.50
7.0.200.0000.00717.00
7.0.140.0100.06722.07
7.0.60.0100.03319.96
7.0.50.0030.08317.91
7.0.40.0100.04720.29
7.0.30.0470.04720.14
7.0.20.0300.07719.98
7.0.10.0130.05020.01
7.0.00.0100.08019.97
5.6.280.0070.06720.86
5.6.210.0100.03320.61
5.6.200.0000.04318.15
5.6.190.0000.04720.61
5.6.180.0200.06020.67
5.6.170.1430.05720.50
5.6.160.0130.03320.38
5.6.150.0170.06318.14
5.6.140.0070.07718.12
5.6.130.0070.06718.20
5.6.120.0100.04020.91
5.6.110.0030.09021.02
5.6.100.0100.09021.00
5.6.90.0000.09021.06
5.6.80.0000.04020.50
5.5.350.0100.09020.46
5.5.340.0130.08017.99
5.5.330.0030.05020.14
5.5.320.0570.05720.19
5.5.310.0300.07020.21
5.5.300.0070.03717.98
5.5.290.0070.08017.96
5.5.280.0100.08020.89
5.5.270.0100.08020.88
5.5.260.0030.06020.87
5.5.250.0100.07020.68
5.5.240.0230.07020.23
5.4.450.0200.04019.43
5.4.440.0230.08019.55
5.4.430.0230.03719.43
5.4.420.0230.03719.26
5.4.410.0370.03019.23
5.4.400.0270.04319.14
5.4.390.0270.07019.25
5.4.380.0200.05719.16
5.4.370.0200.05318.78
5.4.360.0200.04018.92
5.4.350.0830.05319.13
5.4.340.0230.03719.08
5.4.320.0200.03718.80
5.4.310.0200.03719.16
5.4.300.0270.04018.77
5.4.290.0300.06018.90
5.4.280.0300.06019.06
5.4.270.0230.03719.21
5.4.260.0170.04019.21
5.4.250.0230.03319.08
5.4.240.0300.07019.23
5.4.230.0200.03719.08
5.4.220.0230.07018.80
5.4.210.0230.03719.09
5.4.200.0230.07719.08
5.4.190.0330.04319.14
5.4.180.0200.05719.07
5.4.170.0300.04318.90
5.4.160.0300.08018.91
5.4.150.0230.04019.24
5.4.140.0270.03316.40
5.4.130.0300.04716.51
5.4.120.0200.04016.21
5.4.110.0600.05716.36
5.4.100.0370.06316.54
5.4.90.0330.04316.55
5.4.80.0200.06716.41
5.4.70.0200.04016.21
5.4.60.0230.05716.47
5.4.50.0230.04316.45
5.4.40.0230.03016.45
5.4.30.0270.06716.41
5.4.20.0270.04016.40
5.4.10.0270.05716.36
5.4.00.0200.04315.75
5.3.290.0230.04014.61
5.3.280.0370.06714.45
5.3.270.0330.06314.45
5.3.260.0270.05714.48
5.3.250.0370.06014.46
5.3.240.0270.05714.48
5.3.230.0300.04014.43
5.3.220.0200.04014.55
5.3.210.0300.06714.52
5.3.200.0300.07014.40
5.3.190.0370.04314.43
5.3.180.0270.03314.51
5.3.170.0300.06714.52
5.3.160.0300.05014.57
5.3.150.0270.03314.43
5.3.140.0230.04714.50
5.3.130.0300.04314.53
5.3.120.0370.06314.40
5.3.110.0270.03714.57
5.3.100.0200.04013.89
5.3.90.0300.06714.04
5.3.80.0300.06713.82
5.3.70.0270.07313.87
5.3.60.0270.07013.95
5.3.50.0370.06713.80
5.3.40.0270.07013.86
5.3.30.0270.05013.86
5.3.20.0270.06713.53
5.3.10.0230.03713.49
5.3.00.0200.05013.59
5.2.170.0230.06010.99
5.2.160.0200.05710.98
5.2.150.0230.06010.98
5.2.140.0230.04011.22
5.2.130.0300.04311.11
5.2.120.0230.06010.95
5.2.110.0230.02711.25
5.2.100.0330.05010.96
5.2.90.0270.03710.96
5.2.80.0200.05010.94
5.2.70.0170.05310.93
5.2.60.0230.03311.08
5.2.50.0170.04010.87
5.2.40.0200.05710.84
5.2.30.0170.03310.83
5.2.20.0330.03710.84
5.2.10.0130.04710.90
5.2.00.0130.02710.63
5.1.60.0200.0379.98
5.1.50.0170.0239.88
5.1.40.0130.0539.99
5.1.30.0070.03010.38
5.1.20.0130.03010.39
5.1.10.0130.05710.05
5.1.00.0130.03310.14
5.0.50.0070.0208.75
5.0.40.0030.0238.75
5.0.30.0100.0278.75
5.0.20.0100.0178.75
5.0.10.0130.0408.75
5.0.00.0030.0338.75
4.4.90.0070.0138.75
4.4.80.0030.0208.75
4.4.70.0030.0178.75
4.4.60.0070.0138.75
4.4.50.0070.0338.75
4.4.40.0070.0438.75
4.4.30.0130.0238.75
4.4.20.0070.0378.75
4.4.10.0100.0138.75
4.4.00.0000.0308.75
4.3.110.0070.0408.75
4.3.100.0070.0138.75
4.3.90.0070.0138.75
4.3.80.0030.0238.75
4.3.70.0030.0178.75
4.3.60.0030.0178.75
4.3.50.0030.0178.75
4.3.40.0030.0238.75
4.3.30.0030.0178.75
4.3.20.0000.0178.75
4.3.10.0070.0108.75
4.3.00.0100.0308.75

preferences:
69.91 ms | 401 KiB | 5 Q