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.0090.00917.00
8.3.50.0120.00722.25
8.3.40.0140.00318.96
8.3.30.0110.00419.12
8.3.20.0040.00420.16
8.3.10.0080.00023.69
8.3.00.0040.00419.38
8.2.180.0140.00018.67
8.2.170.0100.00722.96
8.2.160.0070.00720.47
8.2.150.0080.00024.18
8.2.140.0030.00624.66
8.2.130.0000.00726.16
8.2.120.0000.00722.26
8.2.110.0100.00020.52
8.2.100.0080.00418.03
8.2.90.0050.00319.08
8.2.80.0030.00617.97
8.2.70.0040.00417.63
8.2.60.0070.00317.93
8.2.50.0030.00618.07
8.2.40.0040.00420.14
8.2.30.0040.00418.01
8.2.20.0080.00017.79
8.2.10.0060.00318.07
8.2.00.0030.00518.00
8.1.280.0110.00425.92
8.1.270.0060.00322.20
8.1.260.0050.00326.35
8.1.250.0050.00228.09
8.1.240.0070.00320.96
8.1.230.0070.00418.94
8.1.220.0080.00017.78
8.1.210.0000.00818.77
8.1.200.0030.00617.48
8.1.190.0000.00817.60
8.1.180.0050.00318.10
8.1.170.0000.00818.96
8.1.160.0040.00422.11
8.1.150.0000.00718.91
8.1.140.0000.00817.67
8.1.130.0000.00717.80
8.1.120.0070.00017.64
8.1.110.0080.00017.58
8.1.100.0040.00317.63
8.1.90.0110.00017.60
8.1.80.0000.00717.54
8.1.70.0000.00817.68
8.1.60.0050.00517.75
8.1.50.0030.00517.57
8.1.40.0000.00817.77
8.1.30.0000.00817.84
8.1.20.0080.00017.88
8.1.10.0000.00717.63
8.1.00.0040.00417.53
8.0.300.0080.00018.77
8.0.290.0040.00416.88
8.0.280.0080.00018.38
8.0.270.0030.00317.24
8.0.260.0040.00417.31
8.0.250.0030.00317.10
8.0.240.0000.00717.20
8.0.230.0000.00717.13
8.0.220.0030.00317.16
8.0.210.0000.00717.15
8.0.200.0080.00017.18
8.0.190.0040.00717.26
8.0.180.0030.00617.13
8.0.170.0030.00617.15
8.0.160.0050.00317.04
8.0.150.0070.00017.09
8.0.140.0000.00717.00
8.0.130.0000.00613.56
8.0.120.0000.00817.01
8.0.110.0000.00717.03
8.0.100.0050.00317.09
8.0.90.0040.00417.20
8.0.80.0140.00317.14
8.0.70.0050.00316.94
8.0.60.0040.00417.14
8.0.50.0070.00017.01
8.0.30.0110.01517.29
8.0.20.0100.01017.40
8.0.10.0030.00616.99
8.0.00.0090.00816.99
7.4.330.0020.00215.02
7.4.320.0000.00616.75
7.4.300.0070.00016.75
7.4.290.0060.00016.73
7.4.280.0050.00316.83
7.4.270.0030.00316.72
7.4.260.0000.00716.72
7.4.250.0000.00716.80
7.4.240.0020.00616.80
7.4.230.0000.00716.73
7.4.220.0040.01516.73
7.4.210.0070.01416.81
7.4.200.0070.00016.89
7.4.160.0080.00816.77
7.4.150.0090.00917.40
7.4.140.0070.01217.86
7.4.130.0130.00716.70
7.4.120.0070.01016.74
7.4.110.0080.01216.79
7.4.100.0090.00916.77
7.4.90.0170.00316.43
7.4.80.0080.00919.39
7.4.70.0120.00516.65
7.4.60.0070.01116.55
7.4.50.0050.00016.76
7.4.40.0120.00316.64
7.4.30.0080.00816.64
7.4.00.0070.00715.32
7.3.330.0000.00513.44
7.3.320.0070.00013.48
7.3.310.0030.00316.34
7.3.300.0030.00316.53
7.3.290.0060.01316.56
7.3.280.0090.00816.56
7.3.270.0120.00617.40
7.3.260.0070.01016.82
7.3.250.0110.00616.48
7.3.240.0120.00916.42
7.3.230.0030.01416.66
7.3.210.0110.00716.77
7.3.200.0090.01619.39
7.3.190.0100.00716.73
7.3.180.0130.00716.71
7.3.170.0100.00716.85
7.3.160.0130.00316.47
7.3.10.0050.00716.78
7.3.00.0020.00816.67
7.2.330.0000.01716.86
7.2.320.0040.01816.80
7.2.310.0100.01416.88
7.2.300.0070.01016.82
7.2.290.0200.00316.83
7.2.130.0070.00617.06
7.2.120.0070.01016.96
7.2.110.0070.01017.11
7.2.100.0070.00916.92
7.2.90.0130.00716.97
7.2.80.0070.00816.92
7.2.70.0130.00317.24
7.2.60.0080.00817.05
7.2.50.0100.00617.11
7.2.40.0140.00717.23
7.2.30.0080.01017.16
7.2.20.0130.00517.10
7.2.10.0070.01017.13
7.2.00.0030.00717.12
7.1.250.0100.00515.68
7.1.200.0060.00315.97
7.1.70.0030.00517.39
7.1.60.0060.01919.11
7.1.50.0070.01417.11
7.1.00.0070.07322.47
7.0.200.0100.00016.83
7.0.140.0030.07322.18
7.0.60.0100.05319.94
7.0.50.0100.06717.82
7.0.40.0030.06020.32
7.0.30.0570.06720.02
7.0.20.0200.05020.14
7.0.10.0100.05320.02
7.0.00.0100.07020.01
5.6.280.0070.07021.09
5.6.210.0030.04020.64
5.6.200.0100.07718.12
5.6.190.0070.05020.45
5.6.180.0330.08020.33
5.6.170.1130.04020.38
5.6.160.0100.06720.48
5.6.150.0100.06018.15
5.6.140.0170.07018.08
5.6.130.0070.08018.23
5.6.120.0000.06720.92
5.6.110.0070.08020.97
5.6.100.0100.06021.00
5.6.90.0030.09721.00
5.6.80.0030.03720.38
5.5.350.0200.07320.30
5.5.340.0130.07717.99
5.5.330.0100.04720.43
5.5.320.0370.07720.30
5.5.310.0330.07020.22
5.5.300.0100.03318.02
5.5.290.0000.05717.97
5.5.280.0100.03720.98
5.5.270.0130.07720.72
5.5.260.0030.04020.97
5.5.250.0100.05020.54
5.5.240.0300.04320.04
5.4.450.0830.07019.44
5.4.440.0800.06019.32
5.4.430.0870.05719.45
5.4.420.0670.00019.45
5.4.410.0630.00019.21
5.4.400.0630.00019.16
5.4.390.0630.00019.05
5.4.380.0630.00019.05
5.4.370.0630.00018.95
5.4.360.0600.00019.05
5.4.350.0670.00019.00
5.4.340.0080.03311.97
5.4.320.0060.03812.46
5.4.310.0060.04612.45
5.4.300.0030.03912.45
5.4.290.0040.03812.45
5.4.280.0060.03512.35
5.4.270.0050.04112.35
5.4.260.0030.04012.35
5.4.250.0110.03212.35
5.4.240.0060.03912.35
5.4.230.0060.04312.34
5.4.220.0040.03812.34
5.4.210.0040.03712.34
5.4.200.0060.03712.34
5.4.190.0070.03612.34
5.4.180.0060.03712.34
5.4.170.0060.03712.35
5.4.160.0080.03412.35
5.4.150.0060.03812.34
5.4.140.0110.03812.02
5.4.130.0060.03412.02
5.4.120.0050.04211.97
5.4.110.0070.03211.96
5.4.100.0080.03211.96
5.4.90.0080.04611.96
5.4.80.0060.03611.96
5.4.70.0070.03311.96
5.4.60.0040.03611.96
5.4.50.0050.03611.96
5.4.40.0040.03711.95
5.4.30.0030.03811.95
5.4.20.0070.03311.95
5.4.10.0070.03511.95
5.4.00.0040.04211.44
5.3.290.0080.03712.80
5.3.280.0040.04012.71
5.3.270.0090.03712.73
5.3.260.0090.04112.72
5.3.250.0100.03612.72
5.3.240.0050.03912.72
5.3.230.0080.03512.71
5.3.220.0070.03512.68
5.3.210.0090.04012.68
5.3.200.0040.04612.68
5.3.190.0070.03712.68
5.3.180.0080.03412.68
5.3.170.0040.03712.67
5.3.160.0110.03912.68
5.3.150.0090.03712.67
5.3.140.0050.03812.66
5.3.130.0060.04012.66
5.3.120.0050.03912.66
5.3.110.0050.03912.66
5.3.100.0030.03812.12
5.3.90.0050.03612.09
5.3.80.0070.03812.08
5.3.70.0060.03712.07
5.3.60.0060.04412.06
5.3.50.0070.03512.00
5.3.40.0060.03612.00
5.3.30.0070.03311.95
5.3.20.0080.03511.73
5.3.10.0050.03511.70
5.3.00.0060.03511.69
5.2.170.0060.0319.19
5.2.160.0040.0319.18
5.2.150.0030.0319.19
5.2.140.0030.0319.18
5.2.130.0040.0289.14
5.2.120.0050.0329.14
5.2.110.0040.0339.16
5.2.100.0090.0249.15
5.2.90.0040.0319.15
5.2.80.0040.0309.14
5.2.70.0080.0329.14
5.2.60.0080.0269.10
5.2.50.0050.0299.07
5.2.40.0060.0269.05
5.2.30.0080.0359.03
5.2.20.0020.0379.02
5.2.10.0050.0278.94
5.2.00.0050.0288.80
5.1.60.0040.0258.08
5.1.50.0040.0248.08
5.1.40.0030.0248.06
5.1.30.0070.0228.41
5.1.20.0040.0278.43
5.1.10.0040.0338.16
5.1.00.0060.0248.16
5.0.50.0060.0246.65
5.0.40.0020.0196.51
5.0.30.0040.0306.32
5.0.20.0010.0216.28
5.0.10.0050.0186.26
5.0.00.0030.0306.25
4.4.90.0010.0174.78
4.4.80.0050.0134.75
4.4.70.0020.0164.75
4.4.60.0030.0154.76
4.4.50.0020.0164.77
4.4.40.0030.0254.71
4.4.30.0020.0184.76
4.4.20.0020.0164.84
4.4.10.0060.0214.85
4.4.00.0050.0224.76
4.3.110.0030.0174.67
4.3.100.0030.0144.66
4.3.90.0040.0164.64
4.3.80.0030.0294.58
4.3.70.0010.0164.63
4.3.60.0030.0134.63
4.3.50.0030.0144.63
4.3.40.0020.0254.54
4.3.30.0020.0163.31
4.3.20.0030.0203.29
4.3.10.0030.0213.24
4.3.00.0130.0277.56

preferences:
45.7 ms | 401 KiB | 5 Q