3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pswd = "1SZ1@1 p"; $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,})/", $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 $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.00316.75
8.3.50.0110.01122.27
8.3.40.0090.00618.76
8.3.30.0120.00618.92
8.3.20.0000.00720.25
8.3.10.0040.00421.76
8.3.00.0040.00419.38
8.2.180.0070.01018.31
8.2.170.0150.00622.96
8.2.160.0070.00719.04
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0030.00526.16
8.2.120.0040.00419.77
8.2.110.0000.00922.32
8.2.100.0040.00819.76
8.2.90.0040.00419.17
8.2.80.0030.00617.97
8.2.70.0030.00517.88
8.2.60.0080.00517.80
8.2.50.0060.00318.07
8.2.40.0000.00820.01
8.2.30.0050.00318.14
8.2.20.0000.00917.92
8.2.10.0040.00418.10
8.2.00.0000.00817.87
8.1.280.0150.00625.92
8.1.270.0040.00722.14
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0100.00023.70
8.1.230.0030.00919.22
8.1.220.0040.00417.78
8.1.210.0090.00018.77
8.1.200.0030.00617.48
8.1.190.0040.00417.23
8.1.180.0050.00318.10
8.1.170.0040.00418.91
8.1.160.0050.00222.02
8.1.150.0040.00418.90
8.1.140.0070.00017.60
8.1.130.0070.00017.88
8.1.120.0040.00317.52
8.1.110.0070.00017.66
8.1.100.0000.00717.55
8.1.90.0050.00517.54
8.1.80.0030.00617.55
8.1.70.0030.00317.55
8.1.60.0000.00817.65
8.1.50.0040.00417.69
8.1.40.0040.00417.58
8.1.30.0030.00617.80
8.1.20.0000.00817.74
8.1.10.0080.00017.71
8.1.00.0040.00417.49
8.0.300.0070.00018.77
8.0.290.0070.00017.13
8.0.280.0000.00718.50
8.0.270.0030.00317.19
8.0.260.0080.00017.31
8.0.250.0000.00717.23
8.0.240.0050.00317.20
8.0.230.0030.00317.18
8.0.220.0040.00417.05
8.0.210.0070.00017.09
8.0.200.0060.00017.20
8.0.190.0000.01117.16
8.0.180.0060.00317.20
8.0.170.0040.00417.11
8.0.160.0000.00717.07
8.0.150.0020.00516.96
8.0.140.0030.00316.98
8.0.130.0000.00613.52
8.0.120.0000.00817.12
8.0.110.0050.00317.10
8.0.100.0040.00417.22
8.0.90.0000.00717.00
8.0.80.0150.00617.16
8.0.70.0070.00017.25
8.0.60.0040.00417.20
8.0.50.0040.00416.98
8.0.30.0130.01017.40
8.0.20.0110.00817.40
8.0.10.0040.00417.07
8.0.00.0120.00817.01
7.4.330.0020.00215.03
7.4.320.0030.00316.79
7.4.300.0060.00016.68
7.4.290.0000.00716.84
7.4.280.0050.00216.76
7.4.270.0040.00416.82
7.4.260.0030.00316.70
7.4.250.0000.00816.57
7.4.240.0000.00716.74
7.4.230.0070.00016.88
7.4.220.0100.00716.68
7.4.210.0110.00716.81
7.4.200.0000.00716.43
7.4.160.0130.00316.63
7.4.150.0130.00617.40
7.4.140.0140.00617.86
7.4.130.0060.01216.73
7.4.120.0140.00316.70
7.4.110.0120.00616.82
7.4.100.0090.00916.63
7.4.90.0090.00916.74
7.4.80.0030.01819.39
7.4.70.0140.00416.64
7.4.60.0030.01316.64
7.4.50.0040.00416.60
7.4.40.0000.01616.61
7.4.30.0070.01016.61
7.4.00.0100.00715.17
7.3.330.0030.00313.40
7.3.320.0060.00013.41
7.3.310.0000.00716.37
7.3.300.0030.00316.48
7.3.290.0120.00816.51
7.3.280.0090.01016.50
7.3.270.0060.01117.40
7.3.260.0120.00916.52
7.3.250.0120.01016.82
7.3.240.0040.01416.82
7.3.230.0080.00916.87
7.3.210.0140.00316.79
7.3.200.0060.01219.39
7.3.190.0100.01016.36
7.3.180.0180.00316.45
7.3.170.0130.00316.50
7.3.160.0030.01316.69
7.3.10.0110.00316.63
7.3.00.0100.00316.88
7.2.330.0090.00816.56
7.2.320.0070.01016.84
7.2.310.0100.00716.63
7.2.300.0000.01616.76
7.2.290.0110.01116.91
7.2.130.0090.00316.85
7.2.120.0070.01017.08
7.2.110.0040.01217.00
7.2.100.0090.00616.95
7.2.90.0090.00617.30
7.2.80.0030.00717.23
7.2.70.0100.00617.26
7.2.60.0000.01216.91
7.2.50.0070.00717.10
7.2.40.0070.01016.99
7.2.30.0040.01217.07
7.2.20.0000.01717.06
7.2.10.0060.00617.00
7.2.00.0060.00317.01
7.1.250.0000.01216.00
7.1.70.0060.00616.95
7.1.60.0160.00919.11
7.1.50.0110.01516.85
7.1.00.0030.07722.38
7.0.200.0040.00417.07
7.0.140.0000.07722.00
7.0.60.0170.08019.79
7.0.50.0070.05017.88
7.0.40.0030.05020.23
7.0.30.0330.07720.14
7.0.20.0230.08020.27
7.0.10.0170.07720.32
7.0.00.0070.08020.22
5.6.280.0000.07721.10
5.6.210.0070.03720.46
5.6.200.0070.03718.15
5.6.190.0030.04020.45
5.6.180.2870.04020.41
5.6.170.0300.06320.62
5.6.160.0200.05720.47
5.6.150.0030.08318.16
5.6.140.0130.07318.22
5.6.130.0130.07718.07
5.6.120.0100.08020.98
5.6.110.0130.06720.98
5.6.100.0000.09021.08
5.6.90.0100.08721.01
5.6.80.0130.07320.28
5.6.70.3630.02720.36
5.5.350.0000.04320.41
5.5.340.0000.04017.96
5.5.330.0030.04320.23
5.5.320.0330.05720.32
5.5.310.0170.03720.29
5.5.300.0070.04718.01
5.5.290.0070.08317.94
5.5.280.0100.07020.88
5.5.270.0070.08320.64
5.5.260.0000.04320.72
5.5.250.0130.07720.77
5.5.240.0230.07720.12
5.4.450.0100.06019.28
5.4.440.0930.07719.32
5.4.430.0900.06719.52
5.4.420.0930.00019.35
5.4.410.0730.00019.36
5.4.400.0630.00019.01
5.4.390.0630.00018.92
5.4.380.0670.00019.00
5.4.370.0630.00019.08
5.4.360.0600.00019.16
5.4.350.0670.00019.11
5.4.340.0150.03911.97
5.4.320.0130.03312.46
5.4.310.0080.05312.45
5.4.300.0080.03612.46
5.4.290.0070.03712.45
5.4.280.0040.03812.35
5.4.270.0070.03512.35
5.4.260.0070.03812.35
5.4.250.0050.03912.35
5.4.240.0070.03912.35
5.4.230.0020.04612.34
5.4.220.0060.03812.34
5.4.210.0070.03712.34
5.4.200.0090.05912.34
5.4.190.0040.03912.34
5.4.180.0050.03712.34
5.4.170.0050.04012.35
5.4.160.0060.03512.34
5.4.150.0060.03512.34
5.4.140.0080.03512.02
5.4.130.0070.04612.01
5.4.120.0040.04611.97
5.4.110.0070.03411.97
5.4.100.0030.03911.97
5.4.90.0080.03611.97
5.4.80.0090.04211.97
5.4.70.0050.04011.96
5.4.60.0060.03411.96
5.4.50.0090.03311.96
5.4.40.0060.03811.95
5.4.30.0070.03511.95
5.4.20.0080.03511.95
5.4.10.0090.03311.95
5.4.00.0040.03811.44
5.3.290.0060.04912.80
5.3.280.0070.03612.71
5.3.270.0060.03812.73
5.3.260.0040.04112.72
5.3.250.0060.03612.72
5.3.240.0050.03912.72
5.3.230.0050.04212.71
5.3.220.0070.05012.68
5.3.210.0110.05512.68
5.3.200.0070.03912.68
5.3.190.0050.04112.68
5.3.180.0110.03712.67
5.3.170.0070.04312.67
5.3.160.0080.04812.67
5.3.150.0080.04012.67
5.3.140.0050.04112.66
5.3.130.0040.04212.66
5.3.120.0030.04112.66
5.3.110.0060.03912.66
5.3.100.0080.03512.12
5.3.90.0090.04412.09
5.3.80.0070.03912.07
5.3.70.0020.03912.08
5.3.60.0080.03512.06
5.3.50.0090.03812.00
5.3.40.0060.03912.00
5.3.30.0080.03611.96
5.3.20.0070.03511.73
5.3.10.0060.03311.70
5.3.00.0060.03511.69
5.2.170.0020.0329.19
5.2.160.0060.0279.19
5.2.150.0030.0319.19
5.2.140.0060.0319.19
5.2.130.0060.0289.14
5.2.120.0040.0299.14
5.2.110.0050.0319.16
5.2.100.0060.0289.15
5.2.90.0040.0369.15
5.2.80.0050.0339.14
5.2.70.0010.0339.14
5.2.60.0040.0349.10
5.2.50.0070.0289.07
5.2.40.0040.0299.06
5.2.30.0050.0379.02
5.2.20.0070.0279.02
5.2.10.0080.0288.93
5.2.00.0050.0288.80
5.1.60.0030.0258.08
5.1.50.0050.0248.08
5.1.40.0040.0248.05
5.1.30.0060.0258.41
5.1.20.0030.0298.43
5.1.10.0050.0258.15
5.1.00.0020.0298.15
5.0.50.0050.0196.64
5.0.40.0050.0186.51
5.0.30.0060.0296.31
5.0.20.0010.0226.28
5.0.10.0030.0206.26
5.0.00.0040.0306.26
4.4.90.0020.0154.78
4.4.80.0030.0164.75
4.4.70.0050.0164.76
4.4.60.0000.0184.75
4.4.50.0030.0204.77
4.4.40.0020.0254.71
4.4.30.0020.0164.76
4.4.20.0020.0164.85
4.4.10.0000.0184.85
4.4.00.0020.0264.76
4.3.110.0020.0164.67
4.3.100.0030.0154.66
4.3.90.0020.0154.64
4.3.80.0000.0274.58
4.3.70.0060.0114.63
4.3.60.0040.0134.63
4.3.50.0000.0184.63
4.3.40.0030.0254.54
4.3.30.0020.0163.30
4.3.20.0030.0153.29
4.3.10.0010.0163.23
4.3.00.0030.0277.48

preferences:
40.77 ms | 401 KiB | 5 Q