3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ "New York Marriott Marquis, New York, NY, USA", "New York,# Marriott, Marquis,& New York, NY, USA,", "$$$^^^&&&&&&,&&&&&########New York, NY, USA" ]; $re = '/^(?!(?:.*[*|\":<>[\]{}`\()\';@&$,]){4}).+$/'; foreach ($strings as $string) { preg_match($re, $string, $matches); var_dump($matches); }

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.4.130.0170.00418.82
8.4.120.0110.00924.08
8.4.110.0100.00818.92
8.4.100.0120.00917.68
8.4.90.0120.00817.75
8.4.80.0150.00517.85
8.4.70.0120.00819.84
8.4.60.0100.00618.97
8.4.50.0060.00418.80
8.4.40.0110.00017.85
8.4.30.0130.00719.45
8.4.20.0180.00319.59
8.4.10.0080.00017.64
8.3.260.0040.00516.56
8.3.250.0040.00418.82
8.3.240.0050.00316.99
8.3.230.0090.01016.86
8.3.220.0110.00818.68
8.3.210.0080.00716.68
8.3.200.0060.00316.85
8.3.190.0130.00618.99
8.3.180.0080.00918.60
8.3.170.0040.00417.11
8.3.160.0060.01218.71
8.3.150.0080.00017.24
8.3.140.0140.00317.15
8.3.130.0040.00416.60
8.3.120.0080.01120.63
8.3.110.0090.00020.94
8.3.100.0030.00624.06
8.3.90.0080.00026.77
8.3.80.0080.00418.68
8.3.70.0070.01416.88
8.3.60.0040.01118.68
8.3.50.0070.00718.42
8.3.40.0110.00418.98
8.3.30.0070.00718.64
8.3.20.0000.00819.07
8.3.10.0080.00019.16
8.3.00.0080.00023.43
8.2.290.0080.01120.17
8.2.280.0110.00718.61
8.2.270.0130.00619.12
8.2.260.0080.00016.54
8.2.250.0000.01916.54
8.2.240.0070.01018.84
8.2.230.0150.00022.58
8.2.220.0070.00337.54
8.2.210.0060.01326.77
8.2.200.0090.00316.88
8.2.190.0080.00816.58
8.2.180.0060.00918.41
8.2.170.0140.00322.96
8.2.160.0110.00322.34
8.2.150.0000.00724.18
8.2.140.0040.00424.66
8.2.130.0050.00319.79
8.2.120.0040.00426.35
8.2.110.0070.00321.25
8.2.100.0130.00017.91
8.2.90.0040.00417.91
8.2.80.0040.00418.89
8.2.70.0000.00818.04
8.2.60.0080.00017.93
8.2.50.0050.00318.10
8.2.40.0000.00719.38
8.2.30.0030.00319.39
8.2.20.0040.00418.15
8.2.10.0050.00218.05
8.2.00.0070.00019.52
8.1.330.0070.00321.89
8.1.320.0130.00616.05
8.1.310.0040.00418.56
8.1.300.0130.00619.98
8.1.290.0000.01130.84
8.1.280.0070.01125.92
8.1.270.0000.00823.99
8.1.260.0000.00726.35
8.1.250.0050.00328.09
8.1.240.0050.00519.25
8.1.230.0070.00419.16
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0000.00817.39
8.1.190.0060.00317.47
8.1.180.0070.00018.10
8.1.170.0050.00318.77
8.1.160.0000.00719.03
8.1.150.0040.00418.93
8.1.140.0050.00217.73
8.1.130.0000.00719.04
8.1.120.0000.00717.55
8.1.110.0000.00717.63
8.1.100.0080.00017.51
8.1.90.0030.00617.64
8.1.80.0030.00617.60
8.1.70.0030.00617.51
8.1.60.0030.00617.70
8.1.50.0000.00817.64
8.1.40.0060.00317.57
8.1.30.0000.01417.64
8.1.20.0040.00417.74
8.1.10.0030.00617.66
8.1.00.0000.00817.62
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0000.00718.44
8.0.270.0030.00317.28
8.0.260.0070.00317.27
8.0.250.0070.00017.01
8.0.240.0080.00017.08
8.0.230.0000.00716.97
8.0.220.0040.00417.07
8.0.210.0030.00317.08
8.0.200.0000.00817.03
8.0.190.0050.00517.09
8.0.180.0040.00417.07
8.0.170.0040.00417.04
8.0.160.0030.00517.10
8.0.150.0040.00416.98
8.0.140.0070.00017.02
8.0.130.0050.00013.54
8.0.120.0050.00316.97
8.0.110.0000.00816.95
8.0.100.0040.00416.94
8.0.90.0030.00316.85
8.0.80.0070.01417.03
8.0.70.0040.00416.91
8.0.60.0050.00316.93
8.0.50.0000.00717.06
8.0.30.0120.00617.27
8.0.20.0090.00917.40
8.0.10.0000.00717.04
8.0.00.0070.01016.86
7.4.330.0000.00515.55
7.4.320.0030.00316.80
7.4.300.0060.00016.80
7.4.290.0030.00316.60
7.4.280.0040.00416.67
7.4.270.0050.00216.82
7.4.260.0030.00616.70
7.4.250.0000.00716.73
7.4.240.0000.00716.69
7.4.230.0030.00316.57
7.4.220.0030.00616.82
7.4.210.0070.00716.75
7.4.200.0000.00716.61
7.4.160.0030.01316.49
7.4.140.0120.00917.86
7.4.130.0080.00816.68
7.4.120.0100.00816.70
7.4.110.0140.01016.79
7.4.100.0110.00716.52
7.4.90.0030.01316.60
7.4.80.0050.01419.39
7.4.70.0110.01116.78
7.4.60.0120.00316.41
7.4.50.0100.00316.88
7.4.40.0090.00916.41
7.4.00.0060.00915.12
7.3.330.0020.00313.14
7.3.320.0000.00613.16
7.3.310.0000.00716.34
7.3.300.0030.00316.32
7.3.290.0000.00816.41
7.3.280.0030.01116.43
7.3.260.0070.01316.60
7.3.240.0100.00816.63
7.3.230.0100.00716.36
7.3.210.0070.01116.72
7.3.200.0140.00316.71
7.3.190.0120.00316.67
7.3.180.0060.01016.34
7.3.170.0040.01116.45
7.3.160.0030.01216.63
7.2.330.0130.01016.75
7.2.320.0070.01516.72
7.2.310.0070.01016.66
7.2.300.0130.01016.76
7.2.290.0090.00916.70
7.2.60.0170.00914.98
7.2.50.3380.01215.32
7.2.40.7420.00715.58
7.2.30.9910.00815.49
7.2.20.8370.00815.30
7.2.10.9350.01115.44
7.2.00.8420.01115.43
7.1.200.0090.00315.95
7.1.171.1090.01014.11
7.1.160.7190.01417.08
7.1.150.7470.01016.66
7.1.140.7870.01016.89
7.1.130.9000.00716.87
7.1.120.8350.01217.02
7.1.110.7080.00716.12
7.1.100.6240.00916.46
7.1.90.7630.00816.39
7.1.80.6430.01216.25
7.1.70.4540.00615.21
7.1.60.8120.01733.18
7.1.50.8670.01333.22
7.1.40.9090.01432.92
7.1.31.1220.01632.79
7.1.21.4170.01232.71
7.1.10.0130.01014.80
7.1.00.0130.00714.88

preferences:
131.78 ms | 403 KiB | 5 Q