3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = [ "Lincoln Crown", "Crown Court", "go holiday", "house fire", "John Hinton", "Hinton Jailed" ]; $output = []; $blacklist = []; foreach ($input as $string) { if (!$blacklist || !preg_match('/\b(?:' . implode('|', $blacklist) . ')\b/', $string)) { $output[] = $string; } foreach(explode(' ', $string) as $word) { $blacklist[$word] = preg_quote($word); } } var_export($blacklist); echo "\n"; var_export($output);

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.120.0110.00924.31
8.4.110.0100.01022.45
8.4.100.0060.00318.83
8.4.90.0090.01222.36
8.4.80.0120.01018.84
8.4.70.0140.00718.89
8.4.60.0100.00618.54
8.4.50.0120.00918.92
8.4.40.0120.00417.93
8.4.30.0130.00322.51
8.4.20.0140.00720.93
8.4.10.0000.01219.70
8.3.250.0090.01019.14
8.3.240.0140.00517.12
8.3.230.0120.00816.98
8.3.220.0080.00919.06
8.3.210.0080.00718.41
8.3.200.0050.00416.86
8.3.190.0110.00817.23
8.3.180.0140.00519.09
8.3.170.0120.00617.09
8.3.160.0080.00017.31
8.3.150.0060.01316.80
8.3.140.0140.00618.91
8.3.130.0060.00318.71
8.3.120.0040.00419.07
8.3.110.0060.00620.94
8.3.100.0030.00617.06
8.3.90.0040.01126.77
8.3.80.0000.01116.73
8.3.70.0080.00816.75
8.3.60.0110.00718.68
8.3.50.0110.00918.47
8.3.40.0090.00618.91
8.3.30.0110.00719.14
8.3.20.0040.00420.85
8.3.10.0090.00021.77
8.3.00.0040.00423.39
8.2.290.0090.00720.45
8.2.280.0120.00718.63
8.2.270.0080.00016.79
8.2.260.0180.00016.52
8.2.250.0080.00017.10
8.2.240.0070.00417.19
8.2.230.0050.00522.58
8.2.220.0040.00424.06
8.2.210.0050.00326.77
8.2.200.0030.00616.75
8.2.190.0060.01316.75
8.2.180.0170.00325.92
8.2.170.0040.01219.21
8.2.160.0070.01322.96
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0050.00226.16
8.2.120.0050.00226.16
8.2.110.0070.00322.33
8.2.100.0080.00417.84
8.2.90.0060.00317.75
8.2.80.0030.00718.89
8.2.70.0040.00417.63
8.2.60.0110.00017.93
8.2.50.0080.00018.07
8.2.40.0000.00818.22
8.2.30.0040.00418.15
8.2.20.0000.00918.29
8.2.10.0080.00019.35
8.2.00.0040.00419.44
8.1.330.0140.01021.95
8.1.320.0090.01016.40
8.1.310.0030.01616.43
8.1.300.0060.01318.51
8.1.290.0030.00630.84
8.1.280.0030.01225.92
8.1.270.0080.00022.32
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0030.00620.73
8.1.230.0090.00317.70
8.1.220.0040.00417.78
8.1.210.0000.00918.77
8.1.200.0000.00917.60
8.1.190.0030.00717.60
8.1.180.0080.00018.10
8.1.170.0040.00419.01
8.1.160.0000.00818.94
8.1.150.0040.00418.88
8.1.140.0040.00418.87
8.1.130.0000.00720.19
8.1.120.0000.00717.63
8.1.110.0080.00017.65
8.1.100.0040.00417.66
8.1.90.0050.00317.66
8.1.80.0000.00717.62
8.1.70.0050.00217.68
8.1.60.0030.00517.83
8.1.50.0060.00317.73
8.1.40.0080.00017.59
8.1.30.0040.00417.88
8.1.20.0060.00317.88
8.1.10.0050.00317.81
8.1.00.0000.00817.56
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0030.00318.46
8.0.270.0030.00517.00
8.0.260.0000.00618.54
8.0.250.0030.00417.12
8.0.240.0070.00017.10
8.0.230.0030.00317.13
8.0.220.0000.00817.07
8.0.210.0030.00516.96
8.0.200.0080.00017.19
8.0.190.0040.00417.02
8.0.180.0000.00717.14
8.0.170.0050.00317.15
8.0.160.0000.00717.05
8.0.150.0040.00817.00
8.0.140.0070.00017.07
8.0.130.0000.00513.57
8.0.120.0030.00517.02
8.0.110.0000.00817.00
8.0.100.0020.00516.89
8.0.90.0000.00816.97
8.0.80.0050.01017.12
8.0.70.0040.00416.88
8.0.60.0000.00717.02
8.0.50.0000.00717.02
8.0.30.0090.00917.56
8.0.20.0080.01117.12
8.0.10.0000.00717.14
8.0.00.0090.01116.96
7.4.330.0020.00215.55
7.4.320.0030.00316.68
7.4.300.0000.00716.84
7.4.290.0000.00816.71
7.4.280.0030.00616.65
7.4.270.0000.00716.90
7.4.260.0000.00716.73
7.4.250.0050.00316.86
7.4.240.0030.00316.82
7.4.230.0070.00016.64
7.4.220.0040.00416.57
7.4.210.0060.01016.87
7.4.200.0030.00316.55
7.4.130.0120.00616.73
7.4.120.0030.01616.83
7.4.110.0080.00816.60
7.4.100.0070.01016.64
7.4.90.0070.01016.74
7.4.80.0120.00919.39
7.4.70.0110.00516.67
7.4.60.0060.01516.50
7.4.50.0000.01816.42
7.4.40.0100.00716.80
7.4.10.0160.00314.96
7.4.00.0100.00715.12
7.3.330.0050.00013.34
7.3.320.0030.00313.33
7.3.310.0030.00316.54
7.3.300.0050.00216.54
7.3.290.0100.00816.49
7.3.280.0130.00616.55
7.3.260.0100.00816.76
7.3.240.0130.00716.58
7.3.230.0070.01016.80
7.3.210.0220.02616.51
7.3.200.0070.01416.80
7.3.190.0000.01716.76
7.3.180.0130.00316.73
7.3.170.0140.00316.41
7.3.160.0070.01016.41
7.3.130.0080.00814.82
7.3.120.0000.01814.94
7.3.110.0100.00714.79
7.3.100.0000.01215.00
7.3.90.0070.01014.98
7.3.80.0100.00315.31
7.3.70.0060.00614.85
7.3.60.0070.00714.94
7.3.50.0110.00615.04
7.3.40.0090.00715.02
7.3.30.0030.00715.09
7.3.20.0120.00715.91
7.3.10.0060.00815.88
7.3.00.0030.00915.93
7.2.330.0110.00616.58
7.2.320.0060.01216.79
7.2.310.0080.00816.84
7.2.300.0110.00716.64
7.2.290.0030.01316.66
7.2.260.0130.00715.03
7.2.250.0070.01115.07
7.2.240.0000.01515.12
7.2.230.0030.01315.20
7.2.220.0070.00715.27
7.2.210.0120.00315.03
7.2.200.0000.00915.41
7.2.190.0020.01215.06
7.2.180.0050.00815.17
7.2.170.0080.01015.23
7.2.160.0030.00815.04
7.2.150.0080.00916.15
7.2.140.0070.00716.06
7.2.130.0050.01016.11
7.2.120.0080.00816.01
7.2.110.0080.00916.18
7.2.100.0080.00916.26
7.2.90.0090.00416.09
7.2.80.0050.01116.14
7.2.70.0100.00616.23
7.2.60.0100.01016.28
7.2.50.0100.00716.35
7.2.40.0500.00916.05
7.2.30.0080.00516.17
7.2.20.0130.00216.07
7.2.10.0090.00616.05
7.2.00.0140.00716.29
7.1.330.0110.00415.84
7.1.320.0000.01615.77
7.1.310.0060.00615.80
7.1.300.0050.01315.15
7.1.290.0060.00915.00
7.1.280.0090.01115.04
7.1.270.0080.00415.13
7.1.260.0080.00815.15
7.1.250.0080.00615.08
7.1.240.0000.01015.93
7.1.230.0070.01115.93
7.1.220.0030.00715.89
7.1.210.0060.00316.05
7.1.200.0080.00416.03
7.1.190.0110.00415.95
7.1.180.0050.00516.14
7.1.170.0040.00716.15
7.1.160.0060.00615.77
7.1.150.0000.00915.94
7.1.140.0080.00315.81
7.1.130.0070.01016.18
7.1.120.0080.00415.68
7.1.110.0040.01116.18
7.1.100.0000.01115.82
7.1.90.0070.00715.84
7.1.80.0070.00415.95
7.1.70.0040.00816.11
7.1.60.0060.00916.11
7.1.50.0060.00315.95
7.1.40.0070.00416.13
7.1.30.0060.00916.11
7.1.20.0070.00416.18
7.1.10.0070.00716.09
7.1.00.0030.01015.82

preferences:
27.96 ms | 403 KiB | 5 Q