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.0030.01417.25
8.3.50.0090.00922.32
8.3.40.0000.01519.02
8.3.30.0130.01019.02
8.3.20.0080.00020.34
8.3.10.0050.00323.52
8.3.00.0080.00019.35
8.2.180.0130.00316.75
8.2.170.0170.00322.96
8.2.160.0000.01320.34
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0040.00422.18
8.2.110.0060.00322.03
8.2.100.0090.00318.16
8.2.90.0030.00518.00
8.2.80.0050.00318.04
8.2.70.0040.00417.93
8.2.60.0050.00317.93
8.2.50.0080.00018.10
8.2.40.0030.00520.59
8.2.30.0000.00818.21
8.2.20.0080.00017.84
8.2.10.0030.00518.19
8.2.00.0060.00318.04
8.1.280.0040.01125.92
8.1.270.0030.00622.12
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0030.00621.18
8.1.230.0120.00019.32
8.1.220.0090.00017.89
8.1.210.0040.00418.77
8.1.200.0090.00017.60
8.1.190.0040.00417.25
8.1.180.0080.00018.10
8.1.170.0000.00818.71
8.1.160.0000.00722.07
8.1.150.0020.00518.95
8.1.140.0050.00317.64
8.1.130.0030.00317.88
8.1.120.0040.00417.65
8.1.110.0000.00917.59
8.1.100.0000.00717.71
8.1.90.0000.00917.58
8.1.80.0000.00717.53
8.1.70.0050.00317.50
8.1.60.0090.00317.64
8.1.50.0040.00417.76
8.1.40.0000.00817.70
8.1.30.0000.00917.84
8.1.20.0000.00717.80
8.1.10.0000.00817.66
8.1.00.0000.00817.53
8.0.300.0000.00819.83
8.0.290.0090.00017.00
8.0.280.0070.00018.50
8.0.270.0040.00417.31
8.0.260.0030.00317.44
8.0.250.0000.00717.20
8.0.240.0000.00717.27
8.0.230.0000.00717.28
8.0.220.0030.00317.14
8.0.210.0000.00817.26
8.0.200.0000.00617.24
8.0.190.0000.01017.13
8.0.180.0040.00417.27
8.0.170.0080.00017.26
8.0.160.0000.00717.20
8.0.150.0050.00217.09
8.0.140.0000.00717.13
8.0.130.0060.00013.67
8.0.120.0050.00317.15
8.0.110.0000.00717.09
8.0.100.0040.00417.07
8.0.90.0040.00417.03
8.0.80.0070.01017.13
8.0.70.0040.00417.05
8.0.60.0040.00417.24
8.0.50.0040.00417.16
8.0.30.0120.00917.21
8.0.20.0090.00917.40
8.0.10.0000.00817.10
8.0.00.0100.00716.93
7.4.330.0030.00315.02
7.4.320.0000.00616.73
7.4.300.0000.00616.77
7.4.290.0000.00716.74
7.4.280.0050.00316.79
7.4.270.0070.00016.72
7.4.260.0030.00316.86
7.4.250.0080.00016.73
7.4.240.0050.00316.77
7.4.230.0000.00716.58
7.4.220.0110.00716.82
7.4.210.0100.00716.72
7.4.200.0080.00016.50
7.4.160.0080.00816.80
7.4.150.0110.01517.40
7.4.140.0110.01217.86
7.4.130.0090.00916.64
7.4.120.0060.01116.86
7.4.110.0030.01316.82
7.4.100.0120.00616.90
7.4.90.0080.01516.81
7.4.80.0120.00619.39
7.4.70.0000.01516.64
7.4.60.0070.01416.75
7.4.50.0060.00316.84
7.4.40.0080.00816.75
7.4.30.0070.01116.81
7.4.00.0090.00415.07
7.3.330.0030.00313.48
7.3.320.0000.00613.45
7.3.310.0070.00016.66
7.3.300.0050.00216.40
7.3.290.0090.00816.54
7.3.280.0140.00716.58
7.3.270.0100.00717.40
7.3.260.0030.01516.55
7.3.250.0120.00716.69
7.3.240.0060.01216.77
7.3.230.0090.00916.59
7.3.210.0130.00616.52
7.3.200.0140.00419.39
7.3.190.0100.00716.49
7.3.180.0080.00816.42
7.3.170.0100.00616.53
7.3.160.0100.01316.79
7.3.10.0070.00716.89
7.3.00.0100.00316.90
7.2.330.0140.00316.51
7.2.320.0070.01116.72
7.2.310.0200.00316.87
7.2.300.0130.00316.82
7.2.290.0090.00916.84
7.2.130.0030.00717.10
7.2.120.0110.00316.86
7.2.110.0030.00917.21
7.2.100.0060.00616.90
7.2.90.0070.01117.06
7.2.80.0030.00916.84
7.2.70.0030.00716.90
7.2.60.0050.01017.15
7.2.50.0040.00817.12
7.2.40.0090.00616.96
7.2.30.0030.01016.80
7.2.20.0030.01017.11
7.2.10.0070.01017.15
7.2.00.0110.00317.14
7.1.250.0030.01015.99
7.1.200.0040.00715.93
7.1.70.0000.00817.53
7.1.60.0100.01419.11
7.1.50.0100.01316.91
7.1.00.0070.07322.43
7.0.200.0000.01016.80
7.0.140.0030.07322.04
7.0.60.0100.08320.07
7.0.50.0030.05017.88
7.0.40.0100.08320.09
7.0.30.0500.06320.32
7.0.20.0300.07320.35
7.0.10.0100.08720.06
7.0.00.0130.07720.14
5.6.280.0030.07321.04
5.6.210.0000.04320.75
5.6.200.0030.05018.18
5.6.190.0000.04720.45
5.6.180.0270.08720.32
5.6.170.1000.04720.54
5.6.160.0100.05720.37
5.6.150.0030.08718.18
5.6.140.0030.04318.15
5.6.130.0070.08018.17
5.6.120.0100.08320.88
5.6.110.0130.06020.98
5.6.100.0030.06021.02
5.6.90.0170.06721.13
5.6.80.0030.04320.42
5.5.350.0170.08020.44
5.5.340.0100.07717.96
5.5.330.0070.06720.45
5.5.320.0330.04320.18
5.5.310.0230.05320.26
5.5.300.0070.03717.95
5.5.290.0030.07717.93
5.5.280.0130.03720.74
5.5.270.0170.07320.89
5.5.260.0030.04320.87
5.5.250.0130.07720.70
5.5.240.0300.06720.29
5.4.450.1270.05019.32
5.4.440.0870.05719.51
5.4.430.0770.05719.48
5.4.420.0700.00019.35
5.4.410.0730.00019.57
5.4.400.0730.00019.03
5.4.390.0630.00019.18
5.4.380.0630.00018.98
5.4.370.0630.00019.05
5.4.360.0630.00019.15
5.4.350.0630.00018.92
5.4.340.0050.04111.97
5.4.320.0050.04012.46
5.4.310.0100.04312.45
5.4.300.0080.04512.45
5.4.290.0100.03712.45
5.4.280.0040.03812.35
5.4.270.0100.03712.35
5.4.260.0080.04812.35
5.4.250.0040.04412.35
5.4.240.0050.03812.35
5.4.230.0040.04612.34
5.4.220.0060.03612.34
5.4.210.0040.03612.34
5.4.200.0070.03612.34
5.4.190.0070.03512.34
5.4.180.0040.04512.34
5.4.170.0070.03812.35
5.4.160.0080.03512.34
5.4.150.0040.03912.34
5.4.140.0100.03612.03
5.4.130.0060.04312.02
5.4.120.0050.03711.97
5.4.110.0100.03511.97
5.4.100.0050.03811.96
5.4.90.0040.04211.97
5.4.80.0090.03411.96
5.4.70.0090.03211.97
5.4.60.0060.04011.96
5.4.50.0050.03511.96
5.4.40.0060.03311.95
5.4.30.0040.03611.95
5.4.20.0040.03711.95
5.4.10.0060.04011.95
5.4.00.0070.04611.44
5.3.290.0020.04912.80
5.3.280.0030.04912.71
5.3.270.0060.04612.72
5.3.260.0050.03912.72
5.3.250.0040.03912.72
5.3.240.0070.03612.71
5.3.230.0060.03712.71
5.3.220.0060.03712.68
5.3.210.0080.03712.68
5.3.200.0040.03912.68
5.3.190.0050.03812.68
5.3.180.0090.03312.67
5.3.170.0070.03512.67
5.3.160.0080.03612.67
5.3.150.0040.03912.67
5.3.140.0070.03512.66
5.3.130.0080.03912.66
5.3.120.0050.04212.66
5.3.110.0090.04112.66
5.3.100.0040.03912.11
5.3.90.0080.03612.09
5.3.80.0080.03712.07
5.3.70.0060.03712.07
5.3.60.0050.03712.07
5.3.50.0020.04012.00
5.3.40.0060.03612.00
5.3.30.0050.03611.95
5.3.20.0080.03311.73
5.3.10.0060.03811.70
5.3.00.0070.03511.69
5.2.170.0030.0319.19
5.2.160.0060.0289.19
5.2.150.0050.0319.19
5.2.140.0030.0329.19
5.2.130.0060.0309.15
5.2.120.0050.0339.15
5.2.110.0070.0339.16
5.2.100.0090.0249.15
5.2.90.0070.0279.15
5.2.80.0060.0299.14
5.2.70.0020.0349.14
5.2.60.0070.0289.10
5.2.50.0070.0309.07
5.2.40.0030.0309.05
5.2.30.0040.0309.03
5.2.20.0030.0309.02
5.2.10.0040.0288.94
5.2.00.0040.0298.80
5.1.60.0060.0228.09
5.1.50.0060.0238.08
5.1.40.0050.0258.05
5.1.30.0040.0308.41
5.1.20.0040.0278.43
5.1.10.0030.0278.15
5.1.00.0030.0278.16
5.0.50.0050.0196.64
5.0.40.0060.0166.51
5.0.30.0050.0306.31
5.0.20.0040.0186.28
5.0.10.0070.0186.26
5.0.00.0050.0326.26
4.4.90.0040.0174.78
4.4.80.0040.0164.75
4.4.70.0010.0174.75
4.4.60.0050.0144.75
4.4.50.0030.0194.77
4.4.40.0030.0284.70
4.4.30.0020.0164.76
4.4.20.0020.0164.84
4.4.10.0030.0154.85
4.4.00.0020.0254.76
4.3.110.0030.0154.67
4.3.100.0030.0144.67
4.3.90.0030.0144.63
4.3.80.0030.0274.58
4.3.70.0040.0144.63
4.3.60.0050.0124.63
4.3.50.0040.0144.63
4.3.40.0060.0214.53
4.3.30.0020.0163.30
4.3.20.0040.0143.28
4.3.10.0040.0153.23
4.3.00.0200.0137.56

preferences:
43.4 ms | 401 KiB | 5 Q