3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pswd = "A1Q1@1pa"; $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("/\d{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.40.0090.00618.87
8.3.30.0120.00319.11
8.3.20.0090.00020.33
8.3.10.0070.00023.48
8.3.00.0050.00319.38
8.2.170.0150.00022.96
8.2.160.0070.00720.38
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.01126.16
8.2.120.0080.00019.89
8.2.110.0060.00320.38
8.2.100.0100.00517.75
8.2.90.0050.00319.03
8.2.80.0080.00017.97
8.2.70.0090.00017.75
8.2.60.0030.00617.68
8.2.50.0060.00318.07
8.2.40.0050.00320.07
8.2.30.0030.00518.00
8.2.20.0060.00318.02
8.2.10.0030.00518.10
8.2.00.0080.00017.90
8.1.270.0090.00022.26
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0030.00623.75
8.1.230.0060.00617.48
8.1.220.0050.00317.77
8.1.210.0040.00418.77
8.1.200.0000.01017.48
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0040.00418.62
8.1.160.0000.00722.00
8.1.150.0040.00418.94
8.1.140.0000.00717.62
8.1.130.0000.00717.80
8.1.120.0040.00417.64
8.1.110.0030.00517.71
8.1.100.0040.00417.53
8.1.90.0070.00317.68
8.1.80.0040.00417.66
8.1.70.0040.00417.63
8.1.60.0000.01017.70
8.1.50.0050.00517.61
8.1.40.0040.00417.59
8.1.30.0030.00517.67
8.1.20.0040.00417.71
8.1.10.0030.00617.61
8.1.00.0030.00617.48
8.0.300.0020.00518.77
8.0.290.0000.00717.13
8.0.280.0050.00218.41
8.0.270.0030.00317.32
8.0.260.0030.00317.42
8.0.250.0030.00517.11
8.0.240.0000.00717.13
8.0.230.0030.00317.20
8.0.220.0000.00717.03
8.0.210.0000.00717.16
8.0.200.0000.00617.24
8.0.190.0090.00317.26
8.0.180.0040.00417.02
8.0.170.0000.00817.14
8.0.160.0040.00417.14
8.0.150.0050.00316.96
8.0.140.0000.00717.13
8.0.130.0000.00613.52
8.0.120.0060.00317.11
8.0.110.0070.00017.09
8.0.100.0040.00417.00
8.0.90.0040.00417.20
8.0.80.0120.00817.17
8.0.70.0040.00417.20
8.0.60.0000.00717.13
8.0.50.0040.00417.16
8.0.30.0160.00817.32
8.0.20.0110.00917.40
8.0.10.0040.00417.12
8.0.00.0060.01116.93
7.4.330.0050.00015.02
7.4.320.0000.00716.85
7.4.300.0030.00316.68
7.4.290.0070.00016.80
7.4.280.0000.00816.84
7.4.270.0030.00316.87
7.4.260.0030.00316.87
7.4.250.0040.00416.72
7.4.240.0020.00516.83
7.4.230.0030.00316.76
7.4.220.0070.01516.66
7.4.210.0110.00816.67
7.4.200.0070.00016.63
7.4.160.0100.00716.81
7.4.150.0120.00617.40
7.4.140.0150.00717.86
7.4.130.0050.01516.65
7.4.120.0110.00616.83
7.4.110.0170.00716.68
7.4.100.0090.00916.59
7.4.90.0130.00616.69
7.4.80.0140.00519.39
7.4.70.0100.00716.76
7.4.60.0090.00916.86
7.4.50.0050.00316.80
7.4.40.0090.00816.76
7.4.30.0070.01016.78
7.4.00.0000.01715.03
7.3.330.0030.00313.48
7.3.320.0000.00613.30
7.3.310.0050.00316.52
7.3.300.0070.00016.50
7.3.290.0080.00516.47
7.3.280.0070.01116.49
7.3.270.0090.00917.40
7.3.260.0070.01016.54
7.3.250.0180.00516.63
7.3.240.0090.00916.44
7.3.230.0130.00616.80
7.3.210.0130.00616.44
7.3.200.0100.01319.39
7.3.190.0030.01616.69
7.3.180.0070.01116.65
7.3.170.0140.00316.87
7.3.160.0060.00916.82
7.3.10.0080.00316.79
7.3.00.0100.00716.75
7.2.330.0130.00316.63
7.2.320.0120.00616.87
7.2.310.0100.00716.78
7.2.300.0090.00917.01
7.2.290.0060.01216.87
7.2.130.0060.00916.92
7.2.120.0000.00917.09
7.2.110.0030.01017.06
7.2.100.0030.00717.08
7.2.90.0000.01716.96
7.2.80.0000.01417.01
7.2.70.0170.00016.71
7.2.60.0070.00717.23
7.2.50.0070.01016.91
7.2.40.0080.00317.24
7.2.30.0100.00716.95
7.2.20.0000.01517.07
7.2.10.0080.00816.64
7.2.00.0030.00817.03
7.1.250.0030.00615.80
7.1.240.0030.00915.98
7.1.230.0060.01016.09
7.1.220.0040.01116.12
7.1.210.0000.01215.60
7.1.200.0070.00716.11
7.1.190.0030.01315.63
7.1.180.0060.00915.86
7.1.170.0100.00715.68
7.1.160.0120.00415.73
7.1.150.0110.00715.86
7.1.140.0040.00815.89
7.1.130.0090.00316.10
7.1.120.0070.00715.83
7.1.110.0070.01016.00
7.1.100.0070.01115.96
7.1.90.0130.00316.04
7.1.80.0000.01115.59
7.1.70.0030.00816.52
7.1.60.0120.00817.41
7.1.50.0080.01216.46
7.1.40.0130.00515.62
7.1.30.0090.00915.86
7.1.20.0080.00815.80
7.1.10.0030.01016.09
7.1.00.0030.04319.10
7.0.330.0040.00815.43
7.0.320.0040.01115.41
7.0.310.0030.01315.54
7.0.300.0110.00315.43
7.0.290.0110.00715.51
7.0.280.0050.01015.45
7.0.270.0140.00715.43
7.0.260.0080.00415.38
7.0.250.0140.00315.37
7.0.240.0030.01215.63
7.0.230.0060.00915.43
7.0.220.0100.00315.21
7.0.210.0030.01115.33
7.0.200.0030.01016.22
7.0.190.0120.00615.33
7.0.180.0090.00615.43
7.0.170.0090.00015.50
7.0.160.0070.00715.06
7.0.150.0100.00315.60
7.0.140.0060.03818.88
7.0.130.0080.00415.60
7.0.120.0090.00615.55
7.0.110.0100.00315.52
7.0.100.0130.02517.53
7.0.90.0030.02617.72
7.0.80.0020.02917.68
7.0.70.0100.02817.68
7.0.60.0020.04117.74
7.0.50.0080.03318.07
7.0.40.0020.03316.77
7.0.30.0070.02316.83
7.0.20.0020.02816.73
7.0.10.0040.02916.85
7.0.00.0040.02616.93
5.6.380.0100.00314.47
5.6.370.0000.01814.41
5.6.360.0080.01114.29
5.6.350.0030.01614.24
5.6.340.0060.00914.27
5.6.330.0040.01114.01
5.6.320.0060.01114.19
5.6.310.0080.01214.19
5.6.300.0060.00614.60
5.6.290.0120.00414.07
5.6.280.0070.03917.59
5.6.270.0100.01014.15
5.6.260.0110.00814.36
5.6.250.0030.03017.37
5.6.240.0020.03117.40
5.6.230.0080.02517.33
5.6.220.0070.02417.52
5.6.210.0000.04117.35
5.6.200.0060.04417.78
5.6.190.0080.02217.61
5.6.180.0060.02917.65
5.6.170.0030.02417.58
5.6.160.0050.02317.84
5.6.150.0030.02917.86
5.6.140.0030.02517.54
5.6.130.0030.02817.75
5.6.120.0050.02417.57
5.6.110.0070.02517.68
5.6.100.0000.03117.64
5.6.90.0070.02417.63
5.6.80.0030.02617.19
5.6.70.0090.02317.38
5.6.60.0020.02617.23
5.6.50.0020.02417.33
5.6.40.0030.02317.13
5.6.30.0090.03217.20
5.6.20.0050.02517.34
5.6.10.0080.02517.27
5.6.00.0000.04417.39
5.5.380.0080.02215.76
5.5.370.0060.02515.70
5.5.360.0080.02415.80
5.5.350.0020.02515.85
5.5.340.0020.02915.94
5.5.330.0050.02116.06
5.5.320.0080.02315.93
5.5.310.0020.03716.06
5.5.300.0020.02515.82
5.5.290.0050.02215.89
5.5.280.0050.03015.94
5.5.270.0030.02515.81
5.5.260.0020.02215.94
5.5.250.0030.02315.76
5.5.240.0060.02115.47
5.5.230.0020.02615.66
5.5.220.0110.01815.59
5.5.210.0040.02315.63
5.5.200.0080.03515.45
5.5.190.0030.02515.64
5.5.180.0000.03215.49
5.5.170.0090.00311.02
5.5.160.0030.03315.51
5.5.150.0070.04015.51
5.5.140.0030.04115.54
5.5.130.0070.04515.52
5.5.120.0050.04515.57
5.5.110.0090.02315.64
5.5.100.0070.04015.48
5.5.90.0080.04315.53
5.5.80.0030.03915.52
5.5.70.0060.04315.42
5.5.60.0080.03515.41
5.5.50.0080.03815.66
5.5.40.0100.02815.45
5.5.30.0030.04315.46
5.5.20.0070.02615.59
5.5.10.0030.04415.50
5.5.00.0060.02615.46
5.4.450.0030.02215.13
5.4.440.0050.02215.28
5.4.430.0050.02315.39
5.4.420.0020.02515.34
5.4.410.0070.01915.20
5.4.400.0020.02715.00
5.4.390.0040.02214.94
5.4.380.0050.02414.91
5.4.370.0050.02015.00
5.4.360.0000.02414.91
5.4.350.0040.02714.98
5.4.340.0030.02214.95
5.4.330.0000.01111.08
5.4.320.0050.04314.94
5.4.310.0000.04415.08
5.4.300.0070.03614.93
5.4.290.0070.04115.02
5.4.280.0030.02915.11
5.4.270.0060.03115.04
5.4.260.0070.04414.89
5.4.250.0020.04214.88
5.4.240.0050.03914.90
5.4.230.0020.04514.85
5.4.220.0070.04614.92
5.4.210.0070.03014.90
5.4.200.0030.02514.90
5.4.190.0050.04014.96
5.4.180.0030.04414.85
5.4.170.0050.03614.96
5.4.160.0100.03414.91
5.4.150.0020.04614.94
5.4.140.0050.04113.79
5.4.130.0080.03713.50
5.4.120.0060.04013.65
5.4.110.0050.02213.54
5.4.100.0070.03813.66
5.4.90.0050.04213.65
5.4.80.0100.03513.66
5.4.70.0040.04313.56
5.4.60.0100.03013.66
5.4.50.0030.02613.65
5.4.40.0030.02613.78
5.4.30.0080.03813.70
5.4.20.0120.03213.66
5.4.10.0150.02813.61
5.4.00.0050.04113.38
5.3.290.0000.04212.50
5.3.280.0030.04212.54
5.3.270.0020.04012.38
5.3.260.0040.02212.56
5.3.250.0060.03812.53
5.3.240.0030.04112.43
5.3.230.0080.02212.50
5.3.220.0030.04012.44
5.3.210.0070.03812.38
5.3.200.0050.02612.51
5.3.190.0030.03412.40
5.3.180.0030.04112.46
5.3.170.0040.04012.49
5.3.160.0020.03012.53
5.3.150.0110.03512.46
5.3.140.0090.03312.50
5.3.130.0030.04212.46
5.3.120.0050.04512.38
5.3.110.0130.03312.48
5.3.100.0050.02312.20
5.3.90.0080.03812.18
5.3.80.0080.03912.16
5.3.70.0040.03912.13
5.3.60.0000.04512.20
5.3.50.0080.03312.06
5.3.40.0080.03411.98
5.3.30.0030.04112.05
5.3.20.0040.04011.95
5.3.10.0040.03611.83
5.3.00.0060.03811.92
5.2.170.0060.01510.18
5.2.160.0050.03110.20
5.2.150.0060.03510.17
5.2.140.0020.02110.27
5.2.130.0020.03310.27
5.2.120.0040.03210.31
5.2.110.0080.03210.26
5.2.100.0030.01810.09
5.2.90.0020.02310.04
5.2.80.0020.02910.10
5.2.70.0030.03310.23
5.2.60.0080.03310.26
5.2.50.0060.03210.17
5.2.40.0050.02510.18
5.2.30.0020.03110.16
5.2.20.0060.03310.00
5.2.10.0050.01610.04
5.2.00.0050.0329.87
5.1.60.0090.0229.24
5.1.50.0040.0199.11
5.1.40.0050.0199.34
5.1.30.0050.0289.56
5.1.20.0030.0319.49
5.1.10.0030.0279.41
5.1.00.0030.0319.35
5.0.50.0050.0108.13
5.0.40.0010.0248.08
5.0.30.0020.0287.99
5.0.20.0000.0207.98
5.0.10.0040.0187.97
5.0.00.0020.0337.99
4.4.90.0070.0177.97
4.4.80.0000.0217.97
4.4.70.0060.0177.97
4.4.60.0060.0137.97
4.4.50.0030.0127.97
4.4.40.0050.0257.97
4.4.30.0030.0187.97
4.4.20.0020.0217.97
4.4.10.0020.0207.97
4.4.00.0020.0177.97
4.3.110.0000.0207.97
4.3.100.0000.0207.97
4.3.90.0010.0107.97
4.3.80.0020.0177.97
4.3.70.0020.0187.97
4.3.60.0020.0207.97
4.3.50.0020.0207.97
4.3.40.0030.0277.97
4.3.30.0000.0207.97
4.3.20.0020.0157.97
4.3.10.0020.0137.97
4.3.00.0020.0157.97

preferences:
80.63 ms | 400 KiB | 5 Q