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 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.0120.00616.63
8.3.50.0090.00921.30
8.3.40.0180.00418.92
8.3.30.0110.00419.10
8.3.20.0030.00520.33
8.3.10.0080.00023.71
8.3.00.0120.00319.38
8.2.180.0070.01016.75
8.2.170.0080.00822.96
8.2.160.0070.00720.52
8.2.150.0090.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0070.00022.19
8.2.110.0070.00322.28
8.2.100.0110.00017.75
8.2.90.0030.00519.02
8.2.80.0040.00417.97
8.2.70.0030.00517.88
8.2.60.0000.01017.93
8.2.50.0110.00018.07
8.2.40.0080.00019.77
8.2.30.0040.00418.24
8.2.20.0040.00417.93
8.2.10.0040.00418.25
8.2.00.0040.00417.86
8.1.280.0140.00425.92
8.1.270.0090.00021.94
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0090.00023.98
8.1.230.0040.00819.48
8.1.220.0040.00417.91
8.1.210.0080.00018.77
8.1.200.0070.00317.37
8.1.190.0080.00017.60
8.1.180.0000.00718.10
8.1.170.0000.00818.96
8.1.160.0040.00421.95
8.1.150.0040.00418.86
8.1.140.0000.00817.65
8.1.130.0020.00517.92
8.1.120.0040.00417.66
8.1.110.0040.00417.66
8.1.100.0080.00017.57
8.1.90.0040.00417.67
8.1.80.0030.00417.64
8.1.70.0030.00317.66
8.1.60.0030.01017.75
8.1.50.0060.00317.72
8.1.40.0000.00817.72
8.1.30.0030.00617.90
8.1.20.0020.00517.80
8.1.10.0040.00417.74
8.1.00.0040.00417.68
8.0.300.0040.00418.77
8.0.290.0000.00817.00
8.0.280.0040.00418.44
8.0.270.0070.00017.18
8.0.260.0030.00317.32
8.0.250.0000.00717.21
8.0.240.0000.00717.20
8.0.230.0030.00317.23
8.0.220.0030.00417.07
8.0.210.0000.00717.20
8.0.200.0000.00617.19
8.0.190.0040.00817.20
8.0.180.0040.00417.09
8.0.170.0040.00417.13
8.0.160.0040.00417.19
8.0.150.0000.00716.98
8.0.140.0000.00717.07
8.0.130.0030.00313.52
8.0.120.0060.00317.09
8.0.110.0030.00517.03
8.0.100.0040.00416.99
8.0.90.0040.00417.04
8.0.80.0000.01617.07
8.0.70.0000.00716.99
8.0.60.0070.00017.26
8.0.50.0040.00417.08
8.0.30.0140.00617.37
8.0.20.0080.01217.47
8.0.10.0040.00417.16
8.0.00.0070.01017.06
7.4.330.0000.00515.02
7.4.320.0050.00216.72
7.4.300.0060.00016.75
7.4.290.0070.00016.82
7.4.280.0050.00216.81
7.4.270.0000.00716.86
7.4.260.0000.00716.82
7.4.250.0040.00416.63
7.4.240.0060.00216.79
7.4.230.0070.00016.89
7.4.220.0090.00916.83
7.4.210.0130.00716.73
7.4.200.0040.00416.60
7.4.160.0100.00616.64
7.4.150.0120.00617.40
7.4.140.0030.01917.86
7.4.130.0120.00516.71
7.4.120.0130.00816.71
7.4.110.0130.01016.70
7.4.100.0130.00616.73
7.4.90.0160.00316.73
7.4.80.0090.00919.39
7.4.70.0070.01016.65
7.4.60.0030.01316.69
7.4.50.0000.00816.75
7.4.40.0070.01416.68
7.4.30.0070.01516.62
7.4.00.0070.01015.39
7.3.330.0000.00513.23
7.3.320.0000.00613.28
7.3.310.0030.00316.60
7.3.300.0070.00016.41
7.3.290.0090.00616.56
7.3.280.0080.00916.52
7.3.270.0110.00717.40
7.3.260.0110.00616.78
7.3.250.0110.00616.54
7.3.240.0070.01716.56
7.3.230.0040.01416.50
7.3.210.0100.00716.37
7.3.200.0070.01119.39
7.3.190.0090.01016.78
7.3.180.0140.00416.39
7.3.170.0060.00916.47
7.3.160.0100.00716.77
7.3.10.0100.00316.92
7.3.00.0100.00016.69
7.2.330.0040.01516.86
7.2.320.0170.00716.93
7.2.310.0130.00316.94
7.2.300.0110.00516.91
7.2.290.0090.01216.72
7.2.130.0060.00317.13
7.2.120.0070.00716.82
7.2.110.0040.00717.04
7.2.100.0090.00317.12
7.2.90.0000.01017.05
7.2.80.0060.00617.13
7.2.70.0070.01016.87
7.2.60.0080.00817.02
7.2.50.0030.00916.81
7.2.40.0070.00417.05
7.2.30.0080.00816.96
7.2.20.0030.01017.22
7.2.10.0110.00416.99
7.2.00.0120.00917.13
7.1.250.0030.00915.71
7.1.70.0060.00617.35
7.1.60.0030.02219.11
7.1.50.0070.01717.17
7.1.00.0000.08022.30
7.0.200.0000.00816.93
7.0.140.0130.06321.96
7.0.60.0400.06720.04
7.0.50.0070.03717.80
7.0.40.0070.05720.14
7.0.30.0370.07720.18
7.0.20.0230.09320.02
7.0.10.0070.06020.35
7.0.00.0100.03720.18
5.6.280.0000.07720.86
5.6.210.0070.03720.69
5.6.200.0070.03718.11
5.6.190.0100.04720.61
5.6.180.0330.07720.57
5.6.170.1600.05320.43
5.6.160.0000.07320.61
5.6.150.0070.04318.18
5.6.140.0000.05018.18
5.6.130.0000.05318.10
5.6.120.0000.04320.88
5.6.110.0170.05721.07
5.6.100.0030.09021.13
5.6.90.0070.09020.92
5.6.80.0100.08320.53
5.5.350.0000.08020.33
5.5.340.0070.05317.87
5.5.330.0170.07720.36
5.5.320.0430.04020.41
5.5.310.0230.06720.18
5.5.300.0070.04717.97
5.5.290.0070.08017.93
5.5.280.0170.07320.87
5.5.270.0130.04720.66
5.5.260.0100.08320.86
5.5.250.0100.03720.61
5.5.240.0030.07720.13
5.4.450.0200.05319.13
5.4.440.0930.06319.53
5.4.430.0830.07319.39
5.4.420.0700.00019.32
5.4.410.0800.00019.15
5.4.400.0630.00019.22
5.4.390.0630.00018.92
5.4.380.0630.00019.09
5.4.370.0630.00019.05
5.4.360.0630.00019.09
5.4.350.0670.00019.15
5.4.340.0110.03211.97
5.4.320.0080.03912.46
5.4.310.0070.04312.45
5.4.300.0060.03812.45
5.4.290.0080.03712.45
5.4.280.0060.03512.35
5.4.270.0090.03312.35
5.4.260.0030.04612.35
5.4.250.0120.03612.35
5.4.240.0040.04012.35
5.4.230.0070.03612.34
5.4.220.0050.04012.34
5.4.210.0050.03812.34
5.4.200.0050.04312.34
5.4.190.0050.03612.34
5.4.180.0070.03512.34
5.4.170.0040.03712.35
5.4.160.0070.03412.35
5.4.150.0050.04312.34
5.4.140.0070.03712.02
5.4.130.0070.03312.01
5.4.120.0050.04211.97
5.4.110.0100.03811.96
5.4.100.0060.03511.96
5.4.90.0030.03911.96
5.4.80.0050.03711.97
5.4.70.0080.03311.96
5.4.60.0080.03311.96
5.4.50.0030.03811.96
5.4.40.0050.03611.95
5.4.30.0040.03711.95
5.4.20.0050.03611.95
5.4.10.0050.04111.95
5.4.00.0040.03811.44
5.3.290.0050.04312.80
5.3.280.0080.03612.71
5.3.270.0050.04012.72
5.3.260.0050.04012.72
5.3.250.0040.03912.72
5.3.240.0050.03812.72
5.3.230.0040.04112.71
5.3.220.0060.03812.68
5.3.210.0080.04112.68
5.3.200.0050.04112.68
5.3.190.0050.04112.67
5.3.180.0050.03912.67
5.3.170.0050.03712.67
5.3.160.0050.03712.67
5.3.150.0040.03912.67
5.3.140.0050.03912.66
5.3.130.0050.03912.66
5.3.120.0060.03912.66
5.3.110.0050.04012.66
5.3.100.0100.03212.12
5.3.90.0110.04112.08
5.3.80.0070.03712.08
5.3.70.0070.03712.08
5.3.60.0060.03712.06
5.3.50.0040.03812.00
5.3.40.0050.03712.00
5.3.30.0090.03211.96
5.3.20.0060.03511.73
5.3.10.0080.03211.70
5.3.00.0020.04111.69
5.2.170.0050.0319.19
5.2.160.0040.0309.19
5.2.150.0080.0279.19
5.2.140.0040.0319.18
5.2.130.0070.0429.15
5.2.120.0040.0299.15
5.2.110.0040.0299.15
5.2.100.0070.0269.15
5.2.90.0050.0289.16
5.2.80.0070.0289.14
5.2.70.0040.0309.14
5.2.60.0020.0329.10
5.2.50.0040.0309.07
5.2.40.0040.0359.05
5.2.30.0070.0379.03
5.2.20.0070.0369.02
5.2.10.0070.0288.94
5.2.00.0020.0328.79
5.1.60.0040.0238.08
5.1.50.0080.0218.08
5.1.40.0050.0248.06
5.1.30.0060.0248.41
5.1.20.0040.0308.43
5.1.10.0110.0258.15
5.1.00.0040.0288.16
5.0.50.0020.0256.64
5.0.40.0030.0216.50
5.0.30.0040.0366.32
5.0.20.0040.0236.28
5.0.10.0040.0196.27
5.0.00.0040.0306.26
4.4.90.0020.0164.78
4.4.80.0000.0184.75
4.4.70.0050.0134.76
4.4.60.0030.0164.76
4.4.50.0040.0174.77
4.4.40.0030.0244.71
4.4.30.0020.0164.76
4.4.20.0040.0194.85
4.4.10.0030.0154.85
4.4.00.0030.0254.76
4.3.110.0040.0144.67
4.3.100.0030.0154.66
4.3.90.0030.0144.63
4.3.80.0010.0324.58
4.3.70.0040.0134.63
4.3.60.0030.0144.63
4.3.50.0030.0154.63
4.3.40.0040.0224.54
4.3.30.0030.0153.31
4.3.20.0000.0193.28
4.3.10.0020.0163.23
4.3.00.0000.0237.55

preferences:
45 ms | 401 KiB | 5 Q