3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pswd = "A13Q21@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.0180.00316.75
8.3.50.0310.00821.13
8.3.40.0070.01018.96
8.3.30.0070.00718.92
8.3.20.0050.00520.12
8.3.10.0040.00423.66
8.3.00.0040.00419.38
8.2.180.0120.00316.75
8.2.170.0120.00622.96
8.2.160.0070.00720.53
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0000.00826.16
8.2.120.0040.00422.31
8.2.110.0040.00420.38
8.2.100.0090.00317.85
8.2.90.0040.00418.16
8.2.80.0040.00417.97
8.2.70.0040.00417.88
8.2.60.0060.00317.79
8.2.50.0030.00618.07
8.2.40.0040.00419.81
8.2.30.0000.00818.00
8.2.20.0040.00417.95
8.2.10.0080.00018.07
8.2.00.0000.00817.86
8.1.280.0110.00725.92
8.1.270.0000.01022.05
8.1.260.0050.00326.35
8.1.250.0000.00728.09
8.1.240.0060.00322.24
8.1.230.0070.00420.76
8.1.220.0040.00417.91
8.1.210.0030.00619.03
8.1.200.0090.00017.60
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0040.00418.89
8.1.160.0070.00021.98
8.1.150.0040.00418.90
8.1.140.0050.00217.63
8.1.130.0070.00017.93
8.1.120.0050.00317.67
8.1.110.0080.00017.46
8.1.100.0040.00417.58
8.1.90.0050.00517.55
8.1.80.0000.00717.68
8.1.70.0050.00217.53
8.1.60.0070.00417.76
8.1.50.0030.00517.70
8.1.40.0080.00017.70
8.1.30.0060.00317.75
8.1.20.0040.00417.80
8.1.10.0040.00417.64
8.1.00.0080.00017.56
8.0.300.0070.00020.16
8.0.290.0040.00417.00
8.0.280.0030.00318.49
8.0.270.0030.00517.22
8.0.260.0000.00717.29
8.0.250.0000.00817.18
8.0.240.0070.00017.14
8.0.230.0030.00317.10
8.0.220.0000.00717.11
8.0.210.0000.00717.17
8.0.200.0030.00517.18
8.0.190.0070.00317.17
8.0.180.0030.00517.13
8.0.170.0040.00417.22
8.0.160.0040.00417.11
8.0.150.0040.00416.98
8.0.140.0000.00716.98
8.0.130.0000.00513.59
8.0.120.0030.00617.03
8.0.110.0050.00217.10
8.0.100.0040.00417.00
8.0.90.0070.00017.13
8.0.80.0030.01917.18
8.0.70.0000.00817.14
8.0.60.0050.00317.09
8.0.50.0000.00717.04
8.0.30.0090.01017.13
8.0.20.0110.00917.40
8.0.10.0070.00017.20
8.0.00.0080.00916.76
7.4.330.0000.00415.02
7.4.320.0030.00316.85
7.4.300.0030.00316.89
7.4.290.0030.00316.85
7.4.280.0040.00416.75
7.4.270.0000.00716.86
7.4.260.0030.00316.86
7.4.250.0060.00316.74
7.4.240.0020.00616.83
7.4.230.0000.00716.61
7.4.220.0060.01416.63
7.4.210.0000.01516.88
7.4.200.0040.00416.87
7.4.160.0060.01016.86
7.4.150.0120.00617.40
7.4.140.0130.00917.86
7.4.130.0070.01016.77
7.4.120.0080.01116.58
7.4.110.0120.00616.64
7.4.100.0100.00716.70
7.4.90.0090.00916.66
7.4.80.0110.00719.39
7.4.70.0090.00916.76
7.4.60.0040.01216.70
7.4.50.0080.00016.81
7.4.40.0160.00016.55
7.4.30.0130.00316.65
7.4.00.0030.00715.37
7.3.330.0000.00513.42
7.3.320.0070.00013.34
7.3.310.0040.00416.36
7.3.300.0030.00316.51
7.3.290.0140.00416.53
7.3.280.0100.00616.50
7.3.270.0120.00617.40
7.3.260.0000.02216.73
7.3.250.0120.00716.79
7.3.240.0130.01016.53
7.3.230.0120.00416.75
7.3.210.0130.00316.52
7.3.200.0040.01819.39
7.3.190.0170.00016.76
7.3.180.0060.01016.34
7.3.170.0070.01016.74
7.3.160.0090.00916.85
7.2.330.0060.01116.63
7.2.320.0100.01316.77
7.2.310.0090.01517.01
7.2.300.0060.00916.77
7.2.290.0110.00816.73
7.2.60.0060.00617.23
7.1.200.0110.00015.79
7.1.70.0000.00817.25
7.1.60.0070.01719.11
7.1.50.0130.01317.14
7.1.00.0030.07722.47
7.0.200.0030.00716.93
7.0.140.0030.07321.96
7.0.60.0070.03719.92
7.0.50.0030.04017.91
7.0.40.0000.06320.00
7.0.30.0500.07720.20
7.0.20.0200.06320.22
7.0.10.0070.07720.15
7.0.00.0100.03720.32
5.6.210.0030.04020.60
5.6.200.0000.04318.13
5.6.190.0030.07320.41
5.6.180.0300.07720.46
5.6.170.1500.04720.50
5.6.160.0070.06320.37
5.6.150.0030.04018.15
5.6.140.0130.04718.08
5.6.130.0070.07718.21
5.6.120.0000.04320.89
5.6.110.0070.08720.95
5.6.100.0130.07320.98
5.6.90.0130.07721.01
5.6.80.0000.04320.52
5.5.350.0230.05320.30
5.5.340.0130.07017.95
5.5.330.0100.07020.21
5.5.320.0330.06020.41
5.5.310.0230.05020.12
5.5.300.0000.06018.02
5.5.290.0130.07717.99
5.5.280.0170.07720.88
5.5.270.0230.06720.86
5.5.260.0030.04320.64
5.5.250.0070.08020.71
5.5.240.0200.06320.28
5.4.450.0370.07319.59
5.4.440.0670.06319.44
5.4.430.0770.05319.43
5.4.420.0670.00019.30
5.4.410.0730.00019.04
5.4.400.0630.00019.38
5.4.390.0630.00019.09
5.4.380.0670.00019.13
5.4.370.0600.00019.13
5.4.360.0600.00018.98
5.4.350.0630.00018.98
5.4.340.0080.04011.97
5.4.320.0050.03712.46
5.4.310.0070.03712.45
5.4.300.0040.03912.46
5.4.290.0050.04212.45
5.4.280.0120.03212.35
5.4.270.0040.03912.35
5.4.260.0040.03912.35
5.4.250.0050.03912.35
5.4.240.0070.03612.35
5.4.230.0090.03512.34
5.4.220.0040.03912.34
5.4.210.0050.03612.34
5.4.200.0070.03512.34
5.4.190.0050.03712.34
5.4.180.0070.03512.34
5.4.170.0070.03512.35
5.4.160.0050.03612.34
5.4.150.0030.03812.34
5.4.140.0090.03412.02
5.4.130.0070.03512.02
5.4.120.0080.03511.97
5.4.110.0020.04011.97
5.4.100.0050.03711.97
5.4.90.0090.03311.96
5.4.80.0040.03811.96
5.4.70.0040.03811.96
5.4.60.0040.03711.96
5.4.50.0020.03911.96
5.4.40.0080.03311.95
5.4.30.0050.03611.95
5.4.20.0040.03611.95
5.4.10.0070.03211.95
5.4.00.0090.03811.44
5.3.290.0050.04012.80
5.3.280.0040.03912.71
5.3.270.0050.03912.72
5.3.260.0070.03712.72
5.3.250.0040.03812.72
5.3.240.0070.03512.72
5.3.230.0050.03712.71
5.3.220.0050.03612.68
5.3.210.0100.03512.68
5.3.200.0050.03712.68
5.3.190.0050.03912.68
5.3.180.0050.03712.67
5.3.170.0060.03612.66
5.3.160.0090.03412.68
5.3.150.0060.03712.67
5.3.140.0050.03812.66
5.3.130.0070.03812.66
5.3.120.0060.03912.66
5.3.110.0100.04112.66
5.3.100.0070.04212.12
5.3.90.0080.03612.09
5.3.80.0020.04112.07
5.3.70.0030.03912.07
5.3.60.0100.03212.06
5.3.50.0080.04112.00
5.3.40.0090.03312.00
5.3.30.0070.03411.96
5.3.20.0070.03311.73
5.3.10.0070.03211.70
5.3.00.0050.03611.69
5.2.170.0050.0299.19
5.2.160.0050.0299.19
5.2.150.0060.0299.19
5.2.140.0060.0299.19
5.2.130.0040.0299.14
5.2.120.0040.0309.14
5.2.110.0080.0279.16
5.2.100.0070.0329.15
5.2.90.0050.0349.15
5.2.80.0060.0299.14
5.2.70.0030.0339.14
5.2.60.0050.0309.10
5.2.50.0070.0329.07
5.2.40.0090.0259.05
5.2.30.0040.0319.02
5.2.20.0070.0269.01
5.2.10.0030.0308.93
5.2.00.0010.0328.79
5.1.60.0030.0248.08
5.1.50.0030.0268.07
5.1.40.0040.0248.05
5.1.30.0020.0288.41
5.1.20.0040.0278.43
5.1.10.0070.0238.15
5.1.00.0040.0258.16
5.0.50.0030.0216.64
5.0.40.0030.0196.50
5.0.30.0040.0306.31
5.0.20.0030.0196.28
5.0.10.0040.0196.27
5.0.00.0030.0316.26
4.4.90.0030.0154.78
4.4.80.0060.0124.76
4.4.70.0030.0154.76
4.4.60.0040.0144.75
4.4.50.0010.0174.77
4.4.40.0010.0274.71
4.4.30.0040.0174.76
4.4.20.0020.0164.85
4.4.10.0000.0184.85
4.4.00.0040.0244.76
4.3.110.0020.0164.67
4.3.100.0040.0134.66
4.3.90.0030.0144.64
4.3.80.0040.0224.58
4.3.70.0020.0154.63
4.3.60.0010.0164.63
4.3.50.0050.0194.63
4.3.40.0030.0284.53
4.3.30.0020.0173.30
4.3.20.0040.0143.28
4.3.10.0040.0133.23
4.3.00.0130.0237.55

preferences:
45.5 ms | 401 KiB | 5 Q