3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pswd = "A1@pa2"; $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].*[0-9])/", $pswd); //two or more digits $upperChar= preg_match("/(?=.*[A-Z]\w\S{2,})/", $pswd); //two or more upper case letters x $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.0160.00318.67
8.3.50.0100.00821.16
8.3.40.0110.00419.07
8.3.30.0030.01418.99
8.3.20.0040.00420.34
8.3.10.0040.00423.69
8.3.00.0070.00719.38
8.2.180.0150.00016.88
8.2.170.0120.00622.96
8.2.160.0130.00320.43
8.2.150.0090.00024.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0020.00522.26
8.2.110.0070.00320.51
8.2.100.0090.00317.97
8.2.90.0030.00618.16
8.2.80.0000.00817.97
8.2.70.0030.00517.63
8.2.60.0060.00318.04
8.2.50.0100.00018.07
8.2.40.0000.00820.07
8.2.30.0060.00318.11
8.2.20.0040.00417.93
8.2.10.0070.00018.19
8.2.00.0000.00717.97
8.1.280.0090.00925.92
8.1.270.0070.00322.16
8.1.260.0140.00326.35
8.1.250.0050.00228.09
8.1.240.0060.00322.13
8.1.230.0090.00320.82
8.1.220.0000.00817.77
8.1.210.0050.00318.99
8.1.200.0060.00317.60
8.1.190.0050.00317.60
8.1.180.0000.00818.10
8.1.170.0040.00418.82
8.1.160.0050.00222.12
8.1.150.0040.00418.87
8.1.140.0070.00017.68
8.1.130.0070.00017.94
8.1.120.0040.00417.58
8.1.110.0040.00417.53
8.1.100.0000.00717.61
8.1.90.0040.00417.58
8.1.80.0040.00417.64
8.1.70.0070.00017.55
8.1.60.0060.00617.67
8.1.50.0050.00517.69
8.1.40.0000.00817.71
8.1.30.0060.00317.86
8.1.20.0060.00317.82
8.1.10.0040.00417.68
8.1.00.0040.00417.65
8.0.300.0000.00820.22
8.0.290.0040.00417.00
8.0.280.0040.00418.50
8.0.270.0000.00717.36
8.0.260.0000.00717.31
8.0.250.0000.00717.10
8.0.240.0000.00717.21
8.0.230.0070.00017.09
8.0.220.0000.00717.14
8.0.210.0000.00717.01
8.0.200.0000.00617.19
8.0.190.0060.00617.14
8.0.180.0030.00517.14
8.0.170.0000.00817.05
8.0.160.0040.00417.21
8.0.150.0040.00417.10
8.0.140.0000.00716.99
8.0.130.0050.00013.60
8.0.120.0040.00417.07
8.0.110.0000.00817.04
8.0.100.0040.00416.96
8.0.90.0000.00717.09
8.0.80.0090.00617.14
8.0.70.0070.00016.96
8.0.60.0000.00717.02
8.0.50.0040.00417.20
8.0.30.0080.01017.29
8.0.20.0080.01217.40
8.0.10.0030.00517.12
8.0.00.0080.01016.90
7.4.330.0000.00515.02
7.4.320.0040.00416.77
7.4.300.0030.00316.73
7.4.290.0040.00416.87
7.4.280.0050.00316.85
7.4.270.0030.00316.84
7.4.260.0040.00416.64
7.4.250.0000.00816.85
7.4.240.0070.00016.80
7.4.230.0000.00716.79
7.4.220.0140.00716.82
7.4.210.0030.01916.89
7.4.200.0000.00716.59
7.4.160.0080.00816.74
7.4.150.0120.00617.40
7.4.140.0100.01117.86
7.4.130.0120.00816.71
7.4.120.0110.01016.80
7.4.110.0140.00316.76
7.4.100.0030.01416.60
7.4.90.0030.01416.75
7.4.80.0030.02019.39
7.4.70.0110.00516.66
7.4.60.0090.00916.58
7.4.50.0000.00816.45
7.4.40.0090.00916.71
7.4.30.0140.00316.64
7.4.00.0050.00515.28
7.3.330.0050.00013.25
7.3.320.0050.00313.43
7.3.310.0070.00016.60
7.3.300.0040.00416.38
7.3.290.0110.00516.50
7.3.280.0080.00816.55
7.3.270.0100.01017.40
7.3.260.0150.00316.87
7.3.250.0100.00816.72
7.3.240.0100.01316.38
7.3.230.0000.01716.67
7.3.210.0130.00316.67
7.3.200.0200.01519.39
7.3.190.0090.00916.42
7.3.180.0080.00916.55
7.3.170.0100.00716.34
7.3.160.0040.01216.69
7.2.330.0080.00916.61
7.2.320.0060.01216.92
7.2.310.0110.00616.65
7.2.300.0140.00716.89
7.2.290.0170.00316.80
7.2.110.0120.00816.83
7.1.70.0100.00617.16
7.1.60.0100.01419.11
7.1.50.0070.01717.09
7.1.00.0070.07322.37
7.0.200.0000.00816.67
7.0.140.0000.07322.00
7.0.110.0000.07019.95
7.0.100.0000.04319.96
7.0.90.0100.03319.92
7.0.80.0100.03019.93
7.0.70.0070.04319.97
7.0.60.0070.03719.65
7.0.50.0100.04019.91
7.0.40.0030.04019.70
7.0.30.0070.03319.86
7.0.20.0000.04319.84
7.0.10.0070.03719.64
7.0.00.0030.04019.64
5.6.280.0030.07020.86
5.6.260.0030.04320.65
5.6.250.0070.04020.68
5.6.240.0070.04020.64
5.6.230.0030.04020.85
5.6.220.0130.05320.70
5.6.210.0030.06320.39
5.6.200.0070.04020.85
5.6.190.0100.03020.65
5.6.180.0070.03720.59
5.6.170.0070.04320.54
5.6.160.0030.04020.85
5.6.150.0030.04020.65
5.6.140.0030.04720.46
5.6.130.0070.03720.46
5.6.120.0100.03720.60
5.6.110.0030.04020.60
5.6.100.0100.03720.61
5.6.90.0000.04020.60
5.6.80.0030.03319.94
5.6.70.0000.04720.05
5.6.60.0100.02719.84
5.6.50.0100.02720.00
5.6.40.0000.04020.00
5.6.30.0100.05019.92
5.6.20.0100.03319.82
5.6.10.0000.04019.82
5.6.00.0070.05719.91
5.5.380.0030.04317.54
5.5.370.0100.07717.51
5.5.360.0030.06017.48
5.5.350.0030.06017.46
5.5.340.0070.03717.85
5.5.330.0070.04318.17
5.5.320.0100.03317.89
5.5.310.0030.04017.85
5.5.300.0000.04318.02
5.5.290.0130.07718.00
5.5.280.0030.03717.86
5.5.270.0030.04018.16
5.5.260.0100.03317.84
5.5.250.0030.03718.06
5.5.240.0070.04317.37
5.5.230.0030.03317.14
5.5.220.0070.04017.14
5.5.210.0070.05317.63
5.5.200.0000.03317.25
5.5.190.0030.07717.24
5.5.180.0070.03317.20
5.5.160.0000.05317.20
5.5.150.0030.04717.47
5.5.140.0070.05317.51
5.5.130.0000.04017.21
5.5.120.0030.04317.48
5.5.110.0030.06017.16
5.5.100.0070.06717.26
5.5.90.0070.03717.37
5.5.80.0000.04317.38
5.5.70.0030.03717.09
5.5.60.0000.04017.22
5.5.50.0030.07717.09
5.5.40.0000.05017.40
5.5.30.0030.03717.10
5.5.20.0030.06016.96
5.5.10.0070.06317.22
5.5.00.0000.03317.25
5.4.450.0070.03719.26
5.4.440.0030.04019.35
5.4.430.0070.05319.44
5.4.420.0070.07019.25
5.4.410.0000.06719.18
5.4.400.0030.03718.96
5.4.390.0030.03719.08
5.4.380.0000.04018.93
5.4.370.0070.04719.20
5.4.360.0070.03019.03
5.4.350.0070.07019.18
5.4.340.0070.04019.11
5.4.320.0070.05019.00
5.4.310.0030.05018.95
5.4.300.0030.05018.94
5.4.290.0000.04018.92
5.4.280.0030.04719.11
5.4.270.0000.04019.05
5.4.260.0070.04318.92
5.4.250.0030.07718.90
5.4.240.0070.03719.09
5.4.230.0000.04019.16
5.4.220.0000.04719.09
5.4.210.0070.06018.99
5.4.200.0070.05018.94
5.4.190.0070.03319.01
5.4.180.0070.05018.92
5.4.170.0070.04319.23
5.4.160.0030.03319.00
5.4.150.0100.03019.25
5.4.140.0030.07016.31
5.4.130.0000.03716.46
5.4.120.0070.06316.29
5.4.110.0030.05716.46
5.4.100.0100.06316.41
5.4.90.0000.04016.43
5.4.80.0000.03716.52
5.4.70.0030.03716.55
5.4.60.0070.04316.11
5.4.50.0000.03316.34
5.4.40.0100.02716.51
5.4.30.0000.04016.35
5.4.20.0000.03316.37
5.4.10.0100.03016.47
5.4.00.0130.02015.78
5.3.290.0030.04014.60
5.3.280.0030.06014.59
5.3.270.0130.07714.64
5.3.260.0100.05714.61
5.3.250.0000.03714.45
5.3.240.0030.03714.55
5.3.230.0000.04014.60
5.3.220.0070.06714.66
5.3.210.0000.03314.64
5.3.200.0070.04014.50
5.3.190.0030.03314.57
5.3.180.0030.03714.66
5.3.170.0070.03014.42
5.3.160.0000.04014.45
5.3.150.0130.02714.64
5.3.140.0070.03014.40
5.3.130.0000.04014.49
5.3.120.0070.03014.64
5.3.110.0000.04714.55
5.3.100.0000.03713.98
5.3.90.0070.02713.88
5.3.80.0070.03314.11
5.3.70.0030.03013.93
5.3.60.0030.03013.97
5.3.50.0000.03314.00
5.3.40.0000.03713.88
5.3.30.0000.03013.98
5.3.20.0070.02313.79
5.3.10.0000.03013.55
5.3.00.0000.03713.57
5.2.170.0030.02312.52
5.2.160.0030.02312.52
5.2.150.0000.02712.52
5.2.140.0070.02312.52
5.2.130.0000.02312.52
5.2.120.0000.02712.52
5.2.110.0000.02712.52
5.2.100.0000.02712.52
5.2.90.0000.02712.52
5.2.80.0070.02012.52
5.2.70.0030.02312.52
5.2.60.0000.02712.52
5.2.50.0030.02312.52
5.2.40.0000.02312.52
5.2.30.0030.02312.52
5.2.20.0000.02712.52
5.2.10.0030.02312.52
5.2.00.0070.02012.52
5.1.60.0000.02312.52
5.1.50.0000.02012.52
5.1.40.0000.02012.52
5.1.30.0070.02012.52
5.1.20.0030.02712.52
5.1.10.0000.02712.52
5.1.00.0000.02312.52
5.0.50.0000.02012.52
5.0.40.0000.01712.52
5.0.30.0030.02312.52
5.0.20.0000.02012.52
5.0.10.0070.01012.52
5.0.00.0000.02712.52
4.4.90.0000.01312.52
4.4.80.0000.01312.52
4.4.70.0000.01312.52
4.4.60.0000.01312.52
4.4.50.0000.01312.52
4.4.40.0000.02012.52
4.4.30.0000.01312.52
4.4.20.0000.01312.52
4.4.10.0030.01012.52
4.4.00.0030.02012.52
4.3.110.0000.01312.52
4.3.100.0000.01312.52
4.3.90.0030.01012.52
4.3.80.0000.02312.52
4.3.70.0000.01312.52
4.3.60.0030.01012.52
4.3.50.0030.01012.52
4.3.40.0000.02012.52
4.3.30.0000.01312.52
4.3.20.0000.01312.52
4.3.10.0000.01312.52
4.3.00.0000.01312.52

preferences:
45.31 ms | 401 KiB | 5 Q