3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pswd = "Ap"; $specialChar= preg_match("/(?=.*[!@#&*%]+)/", $pswd); // at least one $numberChar= preg_match("/(?=.*\d){2,}/", $pswd); //two or more digits $upperChar= preg_match("/(?=.*[A-Z]){2,}/", $pswd); //two or more upper case letters $lowerChar= preg_match("/(?=.*[a-z]){2,}/", $pswd); //two or more lower case letters $pswdLength = preg_match("/(?=^.{6,20}$)/", $pswd); //length of pswd between min and max echo $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.0070.00718.56
8.3.50.0100.01521.19
8.3.40.0060.00918.86
8.3.30.0100.00718.95
8.3.20.0080.00020.29
8.3.10.0040.00421.87
8.3.00.0060.00319.50
8.2.180.0040.01116.75
8.2.170.0070.01422.96
8.2.160.0120.00920.57
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0050.00322.41
8.2.110.0050.00522.32
8.2.100.0030.01017.88
8.2.90.0080.00019.22
8.2.80.0040.00417.97
8.2.70.0000.00817.63
8.2.60.0120.00018.04
8.2.50.0000.00818.07
8.2.40.0000.00818.22
8.2.30.0030.00618.08
8.2.20.0000.00717.82
8.2.10.0050.00218.06
8.2.00.0040.00417.88
8.1.280.0030.01325.92
8.1.270.0030.00622.06
8.1.260.0060.00326.35
8.1.250.0050.00228.09
8.1.240.0060.00323.79
8.1.230.0030.00719.23
8.1.220.0040.00417.78
8.1.210.0030.00518.77
8.1.200.0040.00417.48
8.1.190.0000.00817.48
8.1.180.0000.00818.10
8.1.170.0040.00418.60
8.1.160.0030.00322.03
8.1.150.0020.00518.97
8.1.140.0040.00417.65
8.1.130.0000.00717.85
8.1.120.0000.00717.47
8.1.110.0030.00617.51
8.1.100.0000.00717.61
8.1.90.0000.00717.53
8.1.80.0040.00417.61
8.1.70.0050.00317.57
8.1.60.0000.00917.77
8.1.50.0000.00917.73
8.1.40.0040.00417.59
8.1.30.0030.00617.84
8.1.20.0000.00717.80
8.1.10.0080.00017.70
8.1.00.0040.00417.62
8.0.300.0000.00718.77
8.0.290.0000.00716.88
8.0.280.0000.00718.45
8.0.270.0050.00317.22
8.0.260.0000.00717.30
8.0.250.0040.00417.21
8.0.240.0000.00817.04
8.0.230.0030.00317.04
8.0.220.0050.00316.98
8.0.210.0070.00017.09
8.0.200.0040.00417.13
8.0.190.0060.00617.14
8.0.180.0070.00017.14
8.0.170.0050.00317.11
8.0.160.0000.00817.04
8.0.150.0040.00417.03
8.0.140.0040.00417.10
8.0.130.0060.00013.52
8.0.120.0040.00417.05
8.0.110.0000.00817.10
8.0.100.0000.00717.05
8.0.90.0040.00417.02
8.0.80.0030.01317.12
8.0.70.0040.00417.07
8.0.60.0040.00416.99
8.0.50.0000.00716.93
8.0.30.0150.00617.19
8.0.20.0090.01417.42
8.0.10.0040.00417.12
8.0.00.0100.00917.07
7.4.330.0020.00215.00
7.4.320.0000.00616.82
7.4.300.0060.00016.72
7.4.290.0000.00716.67
7.4.280.0050.00316.77
7.4.270.0080.00016.84
7.4.260.0000.00716.71
7.4.250.0070.00016.77
7.4.240.0080.00016.72
7.4.230.0030.00416.66
7.4.220.0140.00316.74
7.4.210.0030.01716.73
7.4.200.0050.00216.49
7.4.160.0160.00016.45
7.4.150.0130.01317.40
7.4.140.0090.01517.86
7.4.130.0080.01116.61
7.4.120.0050.01216.72
7.4.110.0030.01316.62
7.4.100.0140.00316.69
7.4.90.0100.00916.63
7.4.80.0150.00319.39
7.4.70.0120.00616.55
7.4.60.0110.01016.68
7.4.50.0080.00016.38
7.4.40.0060.01516.71
7.4.30.0130.00716.55
7.4.00.0110.00715.25
7.3.330.0030.00313.37
7.3.320.0030.00313.31
7.3.310.0040.00416.29
7.3.300.0000.00716.39
7.3.290.0080.00816.52
7.3.280.0100.00716.49
7.3.270.0140.00417.40
7.3.260.0000.01716.77
7.3.250.0160.00516.63
7.3.240.0110.00616.45
7.3.230.0170.00416.39
7.3.210.0060.00916.51
7.3.200.0060.01219.39
7.3.190.0110.00516.46
7.3.180.0070.01016.78
7.3.170.0150.00616.52
7.3.160.0030.01816.39
7.3.10.0100.00316.46
7.3.00.0100.00316.88
7.2.330.0140.00316.68
7.2.320.0100.00916.64
7.2.310.0070.01116.74
7.2.300.0110.00616.84
7.2.290.0130.01016.82
7.2.130.0090.00916.99
7.2.120.0000.01017.16
7.2.110.0050.00516.99
7.2.100.0080.00817.26
7.2.90.0090.00317.04
7.2.80.0160.00316.92
7.2.70.0130.00017.05
7.2.60.0100.01017.00
7.2.50.0080.00917.01
7.2.40.0080.00817.13
7.2.30.0030.01717.02
7.2.20.0060.00617.09
7.2.10.0200.00317.04
7.2.00.0140.00816.87
7.1.250.0000.01015.78
7.1.200.0040.01115.88
7.1.70.0090.00317.42
7.1.60.0130.01319.11
7.1.50.0130.01317.09
7.1.00.0030.07322.56
7.0.200.0000.01016.99
7.0.140.0100.06321.98
7.0.60.0100.07719.90
7.0.50.0030.04317.87
7.0.40.0130.08020.00
7.0.30.0600.05320.11
7.0.20.0330.08020.20
7.0.10.0300.07020.35
7.0.00.0070.08720.03
5.6.280.0170.06021.03
5.6.210.0100.08020.46
5.6.200.0130.07718.19
5.6.190.0030.05720.77
5.6.180.0070.08020.44
5.6.170.0330.08020.38
5.6.160.0170.07020.47
5.6.150.0100.04318.11
5.6.140.0100.07018.15
5.6.130.0130.07318.16
5.6.120.0170.07020.88
5.6.110.0000.05021.12
5.6.100.0070.04320.96
5.6.90.0000.04321.02
5.6.80.0030.04320.38
5.6.70.4100.03720.49
5.5.350.0070.08320.42
5.5.340.0100.08017.98
5.5.330.0070.04720.20
5.5.320.0330.07020.18
5.5.310.0230.08020.21
5.5.300.0230.06017.97
5.5.290.0100.07717.91
5.5.280.0030.06720.75
5.5.270.0030.04020.95
5.5.260.0130.06020.75
5.5.250.0030.09020.70
5.5.240.0070.08020.14
5.4.450.0070.06319.44
5.4.440.0800.06319.07
5.4.430.0830.05019.43
5.4.420.0630.00019.35
5.4.410.0630.00019.34
5.4.400.0600.00019.03
5.4.390.0600.00018.96
5.4.380.0630.00019.16
5.4.370.0600.00018.92
5.4.360.0630.00018.96
5.4.350.0630.00019.16
5.4.340.0060.03411.96
5.4.320.0080.03412.45
5.4.310.0070.03712.45
5.4.300.0070.03712.45
5.4.290.0090.03512.45
5.4.280.0050.03812.34
5.4.270.0030.04012.34
5.4.260.0060.03812.34
5.4.250.0100.03512.34
5.4.240.0080.03612.34
5.4.230.0060.03912.34
5.4.220.0060.03612.34
5.4.210.0030.03912.34
5.4.200.0060.03812.34
5.4.190.0030.03912.33
5.4.180.0070.03512.33
5.4.170.0040.03812.34
5.4.160.0080.03412.34
5.4.150.0060.03512.34
5.4.140.0080.03612.02
5.4.130.0080.03412.01
5.4.120.0070.03411.96
5.4.110.0020.04011.96
5.4.100.0060.03511.96
5.4.90.0060.03811.96
5.4.80.0050.03811.96
5.4.70.0070.03311.96
5.4.60.0090.03411.96
5.4.50.0050.03611.96
5.4.40.0040.03711.95
5.4.30.0090.03311.95
5.4.20.0050.04111.95
5.4.10.0080.03411.94
5.4.00.0060.03511.44
5.3.290.0070.04012.80
5.3.280.0050.04012.71
5.3.270.0060.04912.73
5.3.260.0050.04012.72
5.3.250.0030.04012.72
5.3.240.0070.04612.72
5.3.230.0050.03912.71
5.3.220.0060.03712.68
5.3.210.0050.04012.68
5.3.200.0030.04012.68
5.3.190.0080.03912.68
5.3.180.0070.04012.67
5.3.170.0070.03512.67
5.3.160.0080.03512.68
5.3.150.0040.04012.67
5.3.140.0100.03212.66
5.3.130.0060.04012.66
5.3.120.0050.04412.66
5.3.110.0070.03712.66
5.3.100.0050.03812.11
5.3.90.0070.03712.08
5.3.80.0070.03612.07
5.3.70.0070.03812.07
5.3.60.0070.03912.06
5.3.50.0080.03412.00
5.3.40.0080.03512.00
5.3.30.0060.03511.95
5.3.20.0050.03711.72
5.3.10.0040.03811.69
5.3.00.0080.03411.68
5.2.170.0060.0309.18
5.2.160.0050.0319.18
5.2.150.0030.0329.18
5.2.140.0040.0369.18
5.2.130.0030.0319.13
5.2.120.0050.0289.14
5.2.110.0050.0289.14
5.2.100.0040.0309.14
5.2.90.0060.0289.14
5.2.80.0020.0359.13
5.2.70.0040.0319.13
5.2.60.0060.0339.09
5.2.50.0070.0289.05
5.2.40.0000.0359.04
5.2.30.0090.0279.01
5.2.20.0040.0299.00
5.2.10.0070.0268.93
5.2.00.0030.0338.80
5.1.60.0050.0308.08
5.1.50.0040.0248.07
5.1.40.0060.0228.05
5.1.30.0020.0298.41
5.1.20.0020.0298.43
5.1.10.0020.0288.16
5.1.00.0060.0248.16
5.0.50.0040.0236.63
5.0.40.0030.0196.50
5.0.30.0040.0316.30
5.0.20.0030.0216.27
5.0.10.0000.0236.25
5.0.00.0050.0326.24
4.4.90.0030.0154.78
4.4.80.0040.0144.75
4.4.70.0030.0154.76
4.4.60.0030.0194.75
4.4.50.0010.0174.77
4.4.40.0030.0244.70
4.4.30.0030.0184.75
4.4.20.0010.0174.84
4.4.10.0020.0204.85
4.4.00.0020.0274.76
4.3.110.0030.0154.67
4.3.100.0040.0144.67
4.3.90.0040.0144.63
4.3.80.0020.0274.59
4.3.70.0020.0154.63
4.3.60.0020.0154.63
4.3.50.0030.0154.63
4.3.40.0040.0224.54
4.3.30.0010.0173.29
4.3.20.0020.0183.27
4.3.10.0020.0163.23
4.3.00.0070.0277.51

preferences:
52.92 ms | 401 KiB | 5 Q