3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pswd = "A1Q21@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.00916.63
8.3.50.0190.01022.18
8.3.40.0140.00318.82
8.3.30.0070.00719.06
8.3.20.0050.00320.34
8.3.10.0000.00823.66
8.3.00.0090.00019.50
8.2.180.0110.00716.63
8.2.170.0140.00022.96
8.2.160.0090.00620.34
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0090.00922.35
8.2.110.0000.01020.45
8.2.100.0060.00618.00
8.2.90.0040.00419.27
8.2.80.0080.00017.97
8.2.70.0050.00517.62
8.2.60.0070.00418.03
8.2.50.0030.00618.07
8.2.40.0030.00620.07
8.2.30.0030.00618.26
8.2.20.0040.00417.93
8.2.10.0040.00418.05
8.2.00.0000.00817.93
8.1.280.0140.00725.92
8.1.270.0090.00022.14
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0030.00623.89
8.1.230.0040.00817.61
8.1.220.0000.00917.91
8.1.210.0040.00418.77
8.1.200.0060.00317.38
8.1.190.0040.00417.47
8.1.180.0040.00418.10
8.1.170.0000.00818.73
8.1.160.0050.00322.05
8.1.150.0000.00718.95
8.1.140.0000.00717.57
8.1.130.0000.00717.84
8.1.120.0050.00217.62
8.1.110.0000.00817.66
8.1.100.0030.00517.60
8.1.90.0070.00317.64
8.1.80.0000.00817.54
8.1.70.0070.00017.63
8.1.60.0030.00617.72
8.1.50.0000.00817.59
8.1.40.0060.00317.72
8.1.30.0040.00417.84
8.1.20.0000.00817.86
8.1.10.0000.00817.74
8.1.00.0040.00417.60
8.0.300.0000.00818.77
8.0.290.0040.00417.00
8.0.280.0040.00418.41
8.0.270.0050.00217.33
8.0.260.0000.00617.23
8.0.250.0070.00017.15
8.0.240.0050.00217.11
8.0.230.0020.00517.19
8.0.220.0000.00717.18
8.0.210.0000.00717.03
8.0.200.0000.00617.16
8.0.190.0030.00717.21
8.0.180.0070.00017.22
8.0.170.0040.00417.16
8.0.160.0000.00717.04
8.0.150.0030.00517.09
8.0.140.0000.00717.04
8.0.130.0060.00013.52
8.0.120.0000.00817.02
8.0.110.0040.00417.20
8.0.100.0000.00817.04
8.0.90.0000.00716.96
8.0.80.0060.00917.18
8.0.70.0050.00317.20
8.0.60.0040.00416.92
8.0.50.0000.00817.17
8.0.30.0130.00817.19
8.0.20.0090.01017.49
8.0.10.0000.00917.14
8.0.00.0130.00416.91
7.4.330.0060.00015.02
7.4.320.0050.00216.80
7.4.300.0000.00616.82
7.4.290.0030.00316.90
7.4.280.0000.00716.86
7.4.270.0030.00316.84
7.4.260.0000.00716.83
7.4.250.0040.00416.79
7.4.240.0020.00516.89
7.4.230.0050.00316.69
7.4.220.0120.00616.63
7.4.210.0140.00716.81
7.4.200.0070.00016.52
7.4.160.0080.00816.69
7.4.150.0130.00617.40
7.4.140.0120.01217.86
7.4.130.0130.00516.76
7.4.120.0120.00616.85
7.4.110.0120.00616.88
7.4.100.0150.00316.59
7.4.90.0150.00316.86
7.4.80.0090.01319.39
7.4.70.0100.00716.71
7.4.60.0110.00716.55
7.4.50.0000.00816.66
7.4.40.0100.00616.57
7.4.30.0090.00916.67
7.4.00.0040.01115.00
7.3.330.0000.00513.33
7.3.320.0050.00013.44
7.3.310.0080.00016.64
7.3.300.0030.00316.52
7.3.290.0060.01016.54
7.3.280.0110.00716.46
7.3.270.0100.00717.40
7.3.260.0120.00616.43
7.3.250.0070.01316.67
7.3.240.0090.01216.59
7.3.230.0130.00316.66
7.3.210.0150.00616.64
7.3.200.0160.00719.39
7.3.190.0080.00816.47
7.3.180.0030.01316.54
7.3.170.0040.01316.71
7.3.160.0030.01716.52
7.3.10.0030.00616.82
7.3.00.0000.01216.84
7.2.330.0100.00616.89
7.2.320.0110.01116.88
7.2.310.0150.00316.87
7.2.300.0100.00616.88
7.2.290.0110.00816.71
7.2.130.0030.01017.04
7.2.120.0080.00417.13
7.2.110.0090.00317.05
7.2.100.0030.01017.08
7.2.90.0040.01117.29
7.2.80.0110.00317.19
7.2.70.0040.00717.13
7.2.60.0090.00316.80
7.2.50.0110.00317.10
7.2.40.0100.00317.25
7.2.30.0000.01317.31
7.2.20.0060.00316.87
7.2.10.0070.00717.11
7.2.00.0000.01317.00
7.1.250.0030.00715.74
7.1.200.0040.00815.90
7.1.70.0030.01017.48
7.1.60.0160.00919.11
7.1.50.0100.01617.11
7.1.00.0100.07022.33
7.0.200.0030.00716.75
7.0.140.0030.07322.18
7.0.60.0000.08320.03
7.0.50.0070.06717.84
7.0.40.0030.05020.12
7.0.30.0300.07320.02
7.0.20.0230.04720.18
7.0.10.0300.04020.14
7.0.00.0070.07720.19
5.6.280.0000.07721.15
5.6.210.0100.07320.66
5.6.200.0070.04718.22
5.6.190.0070.07020.61
5.6.180.3830.03720.27
5.6.170.0300.04720.44
5.6.160.0000.05020.45
5.6.150.0300.02718.15
5.6.140.0070.04318.20
5.6.130.0030.05018.19
5.6.120.0100.08021.02
5.6.110.0130.08321.00
5.6.100.0000.04721.00
5.6.90.0070.08320.93
5.6.80.0100.08320.40
5.6.70.4630.02320.43
5.5.350.0300.07020.37
5.5.340.0070.07317.93
5.5.330.0100.06720.25
5.5.320.0230.04720.41
5.5.310.0300.03320.20
5.5.300.0100.07718.02
5.5.290.0030.04318.01
5.5.280.0100.08320.88
5.5.270.0070.06720.73
5.5.260.0070.07020.87
5.5.250.0030.09020.68
5.5.240.0030.04720.16
5.4.450.2070.04719.41
5.4.440.0730.05319.34
5.4.430.0830.05319.14
5.4.420.0670.00019.51
5.4.410.0630.00019.24
5.4.400.0630.00019.23
5.4.390.0600.00019.05
5.4.380.0900.00019.07
5.4.370.0630.00019.05
5.4.360.0600.00019.16
5.4.350.0630.00019.05
5.4.340.0040.03611.97
5.4.320.0070.03412.46
5.4.310.0060.04812.45
5.4.300.0040.03712.46
5.4.290.0070.03612.45
5.4.280.0070.03412.35
5.4.270.0050.03612.35
5.4.260.0040.03912.35
5.4.250.0050.03812.35
5.4.240.0050.03712.35
5.4.230.0070.03612.34
5.4.220.0070.03512.34
5.4.210.0040.03712.34
5.4.200.0080.03612.34
5.4.190.0080.03412.34
5.4.180.0070.03412.34
5.4.170.0030.04512.35
5.4.160.0080.03312.34
5.4.150.0040.03712.34
5.4.140.0040.03912.03
5.4.130.0060.03512.01
5.4.120.0060.03511.97
5.4.110.0060.03611.96
5.4.100.0030.03811.97
5.4.90.0040.03811.96
5.4.80.0030.03911.97
5.4.70.0050.03511.96
5.4.60.0070.03511.96
5.4.50.0060.03411.96
5.4.40.0050.03511.95
5.4.30.0070.03311.95
5.4.20.0040.03711.95
5.4.10.0060.03711.95
5.4.00.0070.03511.44
5.3.290.0040.04112.80
5.3.280.0090.03412.71
5.3.270.0060.04312.72
5.3.260.0040.04112.72
5.3.250.0100.03312.72
5.3.240.0040.04012.72
5.3.230.0080.03612.70
5.3.220.0070.03612.68
5.3.210.0060.03912.68
5.3.200.0060.03612.68
5.3.190.0080.03912.68
5.3.180.0090.04112.68
5.3.170.0090.03312.67
5.3.160.0070.04312.67
5.3.150.0090.03412.67
5.3.140.0040.03712.66
5.3.130.0020.04212.66
5.3.120.0070.03712.66
5.3.110.0050.03912.66
5.3.100.0050.03712.12
5.3.90.0030.03812.08
5.3.80.0050.03812.08
5.3.70.0080.03412.08
5.3.60.0050.03712.07
5.3.50.0070.03412.00
5.3.40.0060.03512.00
5.3.30.0040.03711.95
5.3.20.0050.03511.74
5.3.10.0040.03611.70
5.3.00.0060.03411.70
5.2.170.0040.0309.19
5.2.160.0070.0349.19
5.2.150.0060.0279.19
5.2.140.0020.0349.18
5.2.130.0070.0349.14
5.2.120.0050.0279.14
5.2.110.0040.0299.16
5.2.100.0070.0259.15
5.2.90.0070.0269.14
5.2.80.0040.0309.15
5.2.70.0050.0329.14
5.2.60.0060.0399.10
5.2.50.0050.0289.07
5.2.40.0050.0329.06
5.2.30.0070.0269.02
5.2.20.0040.0289.02
5.2.10.0040.0288.94
5.2.00.0040.0288.79
5.1.60.0010.0268.08
5.1.50.0050.0248.07
5.1.40.0070.0248.05
5.1.30.0050.0258.41
5.1.20.0050.0258.43
5.1.10.0040.0298.15
5.1.00.0040.0258.15
5.0.50.0040.0196.64
5.0.40.0020.0206.50
5.0.30.0040.0296.31
5.0.20.0030.0186.28
5.0.10.0030.0196.26
5.0.00.0030.0356.26
4.4.90.0040.0154.78
4.4.80.0020.0164.75
4.4.70.0010.0174.75
4.4.60.0050.0144.75
4.4.50.0040.0134.77
4.4.40.0030.0244.71
4.4.30.0050.0144.76
4.4.20.0030.0144.85
4.4.10.0020.0164.85
4.4.00.0010.0264.76
4.3.110.0050.0224.67
4.3.100.0030.0144.66
4.3.90.0030.0144.63
4.3.80.0020.0244.58
4.3.70.0040.0134.63
4.3.60.0020.0154.63
4.3.50.0030.0154.63
4.3.40.0020.0254.54
4.3.30.0010.0173.30
4.3.20.0020.0163.28
4.3.10.0020.0153.23
4.3.00.0500.02012.27

preferences:
51.15 ms | 401 KiB | 5 Q