3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pswd = "A1Q1@1pa"; $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("/\d{2,}/g", $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.0150.00317.00
8.3.50.0130.00621.21
8.3.40.0080.00818.82
8.3.30.0080.00818.84
8.3.20.0060.00320.24
8.3.10.0000.00923.65
8.3.00.0040.00419.50
8.2.180.0120.00316.88
8.2.170.0110.00422.96
8.2.160.0100.00320.52
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0110.00422.36
8.2.110.0030.00622.30
8.2.100.0120.00017.97
8.2.90.0000.00919.28
8.2.80.0090.00017.97
8.2.70.0040.00417.63
8.2.60.0070.00317.80
8.2.50.0090.00018.07
8.2.40.0060.00320.00
8.2.30.0050.00318.13
8.2.20.0000.00817.80
8.2.10.0000.00818.19
8.2.00.0030.00617.91
8.1.280.0070.00725.92
8.1.270.0000.00922.05
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0080.00323.91
8.1.230.0080.00419.22
8.1.220.0040.00417.91
8.1.210.0000.00818.77
8.1.200.0000.00917.50
8.1.190.0050.00317.48
8.1.180.0050.00318.10
8.1.170.0000.00818.89
8.1.160.0000.00722.07
8.1.150.0040.00418.90
8.1.140.0050.00317.72
8.1.130.0000.00717.92
8.1.120.0030.00517.55
8.1.110.0080.00017.61
8.1.100.0040.00417.67
8.1.90.0110.00017.64
8.1.80.0000.00817.61
8.1.70.0030.00317.61
8.1.60.0030.00917.71
8.1.50.0040.00417.72
8.1.40.0040.00417.75
8.1.30.0030.00617.84
8.1.20.0040.00417.80
8.1.10.0000.00817.68
8.1.00.0040.00417.52
8.0.300.0070.00018.77
8.0.290.0000.00717.00
8.0.280.0030.00318.51
8.0.270.0070.00017.32
8.0.260.0000.00717.23
8.0.250.0030.00317.27
8.0.240.0040.00417.34
8.0.230.0000.00717.13
8.0.220.0030.00317.22
8.0.210.0000.00717.24
8.0.200.0000.00717.25
8.0.190.0070.00317.16
8.0.180.0030.00617.25
8.0.170.0040.00417.20
8.0.160.0040.00417.11
8.0.150.0000.00717.20
8.0.140.0000.00817.17
8.0.130.0000.00613.66
8.0.120.0050.00317.18
8.0.110.0000.00717.18
8.0.100.0080.00017.11
8.0.90.0000.00817.00
8.0.80.0130.00917.16
8.0.70.0070.00017.22
8.0.60.0030.00717.00
8.0.50.0050.00217.17
8.0.30.0140.00517.49
8.0.20.0120.01217.46
8.0.10.0030.00517.26
8.0.00.0100.00916.94
7.4.330.0050.00015.02
7.4.320.0030.00316.87
7.4.300.0000.00616.64
7.4.290.0030.00316.76
7.4.280.0030.00516.80
7.4.270.0000.00716.68
7.4.260.0000.00716.72
7.4.250.0000.00716.80
7.4.240.0050.00216.84
7.4.230.0000.00716.69
7.4.220.0090.00916.80
7.4.210.0120.00616.81
7.4.200.0050.00316.52
7.4.160.0080.00816.75
7.4.150.0090.01617.40
7.4.140.0100.01217.86
7.4.130.0100.00816.70
7.4.120.0120.00516.77
7.4.110.0110.00716.60
7.4.100.0070.01416.68
7.4.90.0110.00716.76
7.4.80.0130.00519.39
7.4.70.0100.00716.68
7.4.60.0100.01416.63
7.4.50.0000.00616.43
7.4.40.0040.01216.82
7.4.30.0060.01116.64
7.4.00.0090.00615.32
7.3.330.0050.00013.39
7.3.320.0030.00313.31
7.3.310.0030.00316.43
7.3.300.0030.00316.59
7.3.290.0090.01016.58
7.3.280.0050.01116.54
7.3.270.0090.00917.40
7.3.260.0120.00616.77
7.3.250.0140.00616.72
7.3.240.0070.01116.43
7.3.230.0090.01216.46
7.3.210.0120.00616.63
7.3.200.0140.01019.39
7.3.190.0140.00716.45
7.3.180.0030.01316.67
7.3.170.0060.01216.83
7.3.160.0100.01216.81
7.3.10.0080.00716.94
7.3.00.0020.00916.87
7.2.330.0100.00716.64
7.2.320.0090.00916.91
7.2.310.0000.01716.80
7.2.300.0110.00716.98
7.2.290.0110.00716.81
7.2.130.0020.01217.02
7.2.120.0080.00917.13
7.2.110.0070.00417.20
7.2.100.0050.00917.12
7.2.90.0050.00917.12
7.2.80.0090.00317.11
7.2.70.0070.00717.04
7.2.60.0060.00817.10
7.2.50.0040.01116.95
7.2.40.0050.00717.08
7.2.30.0030.00817.08
7.2.20.0050.00917.03
7.2.10.0050.00617.08
7.2.00.0070.00816.95
7.1.250.0030.01115.89
7.1.200.0060.00616.10
7.1.70.0090.00317.34
7.1.60.0070.01719.11
7.1.50.0160.00617.14
7.1.00.0030.07722.34
7.0.200.0050.00517.08
7.0.140.0070.07021.96
7.0.60.0070.08020.07
7.0.50.0030.04317.89
7.0.40.0070.05319.98
7.0.30.0230.04320.20
7.0.20.0200.05320.01
7.0.10.0130.08320.19
7.0.00.0030.05020.03
5.6.280.0000.07721.07
5.6.210.0070.07020.50
5.6.200.0130.07318.10
5.6.190.0100.04020.56
5.6.180.0270.04020.33
5.6.170.1470.06320.52
5.6.160.0070.07020.51
5.6.150.0100.07718.11
5.6.140.0030.08018.12
5.6.130.0070.08018.11
5.6.120.0030.04320.89
5.6.110.0030.05321.14
5.6.100.0100.07721.02
5.6.90.0100.09020.98
5.6.80.0270.06020.42
5.5.350.0170.08320.52
5.5.340.0070.07318.02
5.5.330.0030.04720.21
5.5.320.0400.06020.41
5.5.310.0200.06320.26
5.5.300.0100.03318.00
5.5.290.0030.04017.96
5.5.280.0030.08720.96
5.5.270.0070.07320.86
5.5.260.0100.08020.63
5.5.250.0170.04320.68
5.5.240.0200.07720.19
5.4.450.0330.06319.57
5.4.440.0330.04319.41
5.4.430.0330.07319.24
5.4.420.0330.05319.40
5.4.410.0300.03319.39
5.4.400.0430.03718.92
5.4.390.0330.05018.80
5.4.380.0370.06319.16
5.4.370.0370.03719.26
5.4.360.0370.03319.06
5.4.350.0500.06019.06
5.4.340.0330.06319.08
5.4.320.0330.07318.92
5.4.310.0400.03018.77
5.4.300.0370.07319.15
5.4.290.0270.04318.93
5.4.280.0400.07019.13
5.4.270.0430.03719.25
5.4.260.0430.05719.10
5.4.250.0300.05018.91
5.4.240.0530.05018.92
5.4.230.0530.05318.93
5.4.220.0400.04319.13
5.4.210.0370.03319.21
5.4.200.0400.05719.06
5.4.190.0330.04018.81
5.4.180.0430.06019.12
5.4.170.0530.06019.08
5.4.160.0500.06319.08
5.4.150.0530.06318.91
5.4.140.0470.03316.31
5.4.130.0600.04016.30
5.4.120.0530.05716.23
5.4.110.0470.06316.23
5.4.100.0370.03316.11
5.4.90.0530.05016.53
5.4.80.0330.04016.43
5.4.70.0370.03316.47
5.4.60.0330.04016.41
5.4.50.0470.04016.20
5.4.40.0370.04316.45
5.4.30.0430.04016.47
5.4.20.0270.03716.36
5.4.10.0330.03016.15
5.4.00.0400.04715.89
5.3.290.0530.06314.75
5.3.280.0330.07314.45
5.3.270.0430.06314.62
5.3.260.0400.06014.55
5.3.250.0370.03314.56
5.3.240.0300.05714.54
5.3.230.0370.06014.43
5.3.220.0270.04014.42
5.3.210.0430.05714.52
5.3.200.0300.04014.41
5.3.190.0330.04014.44
5.3.180.0300.04314.41
5.3.170.0270.04314.42
5.3.160.0370.03314.41
5.3.150.0400.05014.50
5.3.140.0300.04714.39
5.3.130.0370.06714.38
5.3.120.0300.04014.48
5.3.110.0370.05314.39
5.3.100.0270.04014.13
5.3.90.0370.03313.96
5.3.80.0370.03713.96
5.3.70.0330.03714.04
5.3.60.0300.04313.80
5.3.50.0400.04013.99
5.3.40.0270.07014.04
5.3.30.0400.04013.77
5.3.20.0330.03713.81
5.3.10.0300.03313.64
5.3.00.0330.03013.62
5.2.170.0270.02311.20
5.2.160.0230.02711.16
5.2.150.0270.02711.19
5.2.140.0270.03711.03
5.2.130.0230.03310.94
5.2.120.0330.02311.16
5.2.110.0300.03711.18
5.2.100.0330.02311.12
5.2.90.0370.02010.96
5.2.80.0230.03311.11
5.2.70.0270.03011.04
5.2.60.0300.04010.89
5.2.50.0370.04011.03
5.2.40.0230.03310.94
5.2.30.0200.02710.82
5.2.20.0230.03010.86
5.2.10.0270.02710.82
5.2.00.0230.05010.66
5.1.60.0370.0409.89
5.1.50.0270.03010.07
5.1.40.0230.0309.86
5.1.30.0270.02710.34
5.1.20.0330.05010.46
5.1.10.0200.0309.96
5.1.00.0270.03010.11
5.0.50.0130.0238.70
5.0.40.0130.0278.34
5.0.30.0130.0338.16
5.0.20.0070.0278.36
5.0.10.0200.0408.41
5.0.00.0170.0438.06
4.4.90.0100.0177.00
4.4.80.0130.0377.00
4.4.70.0130.0277.00
4.4.60.0070.0277.08
4.4.50.0130.0177.08
4.4.40.0100.0277.08
4.4.30.0230.0277.09
4.4.20.0100.0277.10
4.4.10.0200.0307.10
4.4.00.0170.0377.10
4.3.110.0200.0277.10
4.3.100.0100.0177.10
4.3.90.0130.0337.10
4.3.80.0130.0507.11
4.3.70.0130.0307.11
4.3.60.0170.0237.11
4.3.50.0200.0137.11
4.3.40.0200.0407.12
4.3.30.0070.0237.13
4.3.20.0100.0277.14
4.3.10.0070.0237.14
4.3.00.0130.0337.14

preferences:
48.43 ms | 401 KiB | 5 Q