3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'Love in My Antonia Love in'; preg_match_all('~(\b\w++(?> \w++)*)(?=.*?\b\1)~i', $str, $matches); // Remove duplicate found values from matches $array = array_unique(array_map('strtolower', $matches[1])); foreach ($array as $value) { // Remove found phrase / word from the end $str = preg_replace("~^.*\K(?<!\s)\s*\b$value~i", '', $str); } echo trim($str); // Love in My Antonia

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.5.00.0110.01120.18
8.4.150.0020.00014.05
8.4.140.0140.00817.91
8.4.130.0060.00318.05
8.4.120.0110.00720.38
8.4.110.0120.00822.59
8.4.100.0020.00718.26
8.4.90.0110.00918.76
8.4.80.0110.00919.77
8.4.70.0090.00418.09
8.4.60.0110.00618.09
8.4.50.0040.00519.01
8.4.40.0060.01019.78
8.4.30.0150.00617.89
8.4.20.0140.00720.28
8.4.10.0090.00019.89
8.3.280.0160.00718.69
8.3.270.0120.01016.57
8.3.260.0130.00716.80
8.3.250.0050.00519.12
8.3.240.0130.00617.10
8.3.230.0120.00616.59
8.3.220.0100.00817.10
8.3.210.0090.01016.85
8.3.200.0060.01316.57
8.3.190.0090.00618.62
8.3.180.0070.00816.86
8.3.170.0170.00318.73
8.3.160.0080.00020.16
8.3.150.0090.00918.45
8.3.140.0100.00719.08
8.3.130.0070.00318.29
8.3.120.0110.00719.01
8.3.110.0090.00320.94
8.3.100.0070.00416.65
8.3.90.0080.00018.43
8.3.80.0060.00618.55
8.3.70.0060.00916.38
8.3.60.0030.01718.68
8.3.50.0070.01218.41
8.3.40.0130.01018.90
8.3.30.0040.01118.88
8.3.20.0000.00819.15
8.3.10.0040.00421.85
8.3.00.0080.00020.94
8.2.290.0100.00820.48
8.2.280.0070.00316.78
8.2.270.0160.00319.27
8.2.260.0100.01016.95
8.2.250.0040.00416.89
8.2.240.0100.00717.38
8.2.230.0040.00422.58
8.2.220.0000.00924.06
8.2.210.0140.00026.77
8.2.200.0090.00018.54
8.2.190.0060.01316.74
8.2.180.0140.00316.63
8.2.170.0120.00622.96
8.2.160.0100.00322.38
8.2.150.0000.01424.18
8.2.140.0050.00324.66
8.2.130.0040.00418.09
8.2.120.0080.00026.35
8.2.110.0060.00322.42
8.2.100.0070.00417.99
8.2.90.0050.00220.50
8.2.80.0000.00817.97
8.2.70.0040.00417.93
8.2.60.0000.00818.16
8.2.50.0040.00418.10
8.2.40.0030.00619.35
8.2.30.0080.00019.36
8.2.20.0030.00318.00
8.2.10.0030.00518.22
8.2.00.0030.00618.11
8.1.330.0140.00521.98
8.1.320.0060.00216.68
8.1.310.0070.01118.57
8.1.300.0080.00018.43
8.1.290.0030.00618.88
8.1.280.0090.00925.92
8.1.270.0040.00422.24
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0030.00623.73
8.1.230.0040.00722.15
8.1.220.0000.00817.74
8.1.210.0030.00618.88
8.1.200.0040.00417.61
8.1.190.0060.00317.64
8.1.180.0060.00318.10
8.1.170.0000.00818.63
8.1.160.0000.00718.82
8.1.150.0000.00718.82
8.1.140.0070.00022.04
8.1.130.0000.00720.11
8.1.120.0000.00717.45
8.1.110.0040.00417.53
8.1.100.0000.00717.61
8.1.90.0030.00317.57
8.1.80.0030.00517.50
8.1.70.0030.00317.56
8.1.60.0050.00317.72
8.1.50.0000.00817.68
8.1.40.0030.00517.68
8.1.30.0000.00817.66
8.1.20.0060.00317.86
8.1.10.0050.00317.71
8.1.00.0000.00817.69
8.0.300.0030.00520.03
8.0.290.0040.00416.88
8.0.280.0050.00318.51
8.0.270.0040.00416.95
8.0.260.0030.00518.38
8.0.250.0030.00317.07
8.0.240.0040.00417.07
8.0.230.0000.00716.99
8.0.220.0040.00416.89
8.0.210.0020.00516.91
8.0.200.0040.00417.12
8.0.190.0030.00517.12
8.0.180.0080.00017.09
8.0.170.0040.00416.99
8.0.160.0070.00016.93
8.0.150.0000.00816.98
8.0.140.0000.00716.89
8.0.130.0000.00613.49
8.0.120.0000.00817.04
8.0.110.0040.00417.05
8.0.100.0040.00417.02
8.0.90.0040.00417.01
8.0.80.0100.01016.95
8.0.70.0040.00417.04
8.0.60.0040.00316.89
8.0.50.0040.00416.98
8.0.30.0090.00917.08
8.0.20.0110.00917.42
8.0.10.0040.00417.15
8.0.00.0080.01016.78
7.4.330.0000.00515.55
7.4.320.0030.00316.82
7.4.300.0030.00316.69
7.4.290.0070.00016.84
7.4.280.0000.00816.56
7.4.270.0030.00316.86
7.4.260.0000.00716.66
7.4.250.0040.00416.69
7.4.240.0070.00016.70
7.4.230.0050.00216.89
7.4.220.0050.00216.65
7.4.210.0090.00916.79
7.4.200.0000.00716.63
7.4.160.0090.00716.62
7.4.140.0100.00817.86
7.4.130.0060.01216.88
7.4.120.0090.00816.82
7.4.110.0080.01216.93
7.4.100.0070.01016.81
7.4.90.0060.01216.67
7.4.80.0120.00619.39
7.4.70.0060.01016.64
7.4.60.0070.01316.69
7.4.50.0120.00416.74
7.4.40.0120.00916.89
7.4.00.0050.01015.32
7.3.330.0030.00313.16
7.3.320.0000.00613.30
7.3.310.0040.00416.50
7.3.300.0070.00016.48
7.3.290.0000.00716.50
7.3.280.0100.00516.51
7.3.260.0100.01016.60
7.3.240.0080.01016.50
7.3.230.0080.01016.60
7.3.210.0130.00316.51
7.3.200.0080.00816.59
7.3.190.0000.02216.57
7.3.180.0120.00616.45
7.3.170.0090.00816.75
7.3.160.0150.00616.70
7.3.120.0070.01114.80
7.3.110.0100.00715.17
7.3.100.0040.01514.73
7.3.90.0030.00914.79
7.3.80.0040.00815.22
7.3.70.0090.00614.84
7.3.60.0040.00414.74
7.3.50.0070.00715.04
7.3.40.0060.00315.08
7.3.30.0060.01214.71
7.3.20.0110.00416.80
7.3.10.0110.00717.03
7.3.00.0060.00616.70
7.2.330.0270.01716.91
7.2.320.0030.01316.88
7.2.310.0070.01017.00
7.2.300.0100.01016.79
7.2.290.0070.01016.73
7.2.250.0030.01715.09
7.2.240.0040.01515.34
7.2.230.0000.01715.29
7.2.220.0080.00615.40
7.2.210.0000.01815.18
7.2.200.0060.00315.01
7.2.190.0040.01215.09
7.2.180.0040.00815.23
7.2.170.0070.01115.06
7.2.120.0030.01016.87
7.2.110.0030.00916.75
7.2.100.0090.00616.75
7.2.90.0030.01016.94
7.2.80.0090.00616.47
7.2.70.0060.01017.10
7.2.60.0090.00916.93
7.2.50.0070.00717.05
7.2.40.0140.00017.21
7.2.30.0030.01217.20
7.2.20.0070.01017.10
7.2.10.0090.00617.25
7.2.00.0120.00316.80
7.1.330.0130.00016.14
7.1.320.0030.01415.74
7.1.310.0040.01115.73
7.1.300.0040.00815.85
7.1.290.0100.00315.94
7.1.280.0100.00315.95
7.1.270.0060.00916.22
7.1.260.0030.00615.74
7.1.240.0000.01115.96
7.1.230.0090.00616.07
7.1.220.0070.00715.82
7.1.210.0100.00716.13
7.1.200.0070.00715.99
7.1.190.0060.00916.03
7.1.180.0110.00415.81
7.1.170.0110.00315.92
7.1.160.0090.00615.92
7.1.150.0130.00515.95
7.1.140.0060.00916.10
7.1.130.0000.01215.80
7.1.120.0060.00916.00
7.1.110.0030.01215.84
7.1.100.0090.00615.94
7.1.90.0090.00616.07
7.1.80.0100.00316.13
7.1.70.0030.01315.95
7.1.60.0090.00316.14
7.1.50.0120.00316.19
7.1.40.0040.01115.63
7.1.30.0090.00615.79
7.1.20.0060.00615.71
7.1.10.0060.00615.94
7.1.00.0090.00615.94
5.6.380.0070.01014.41

preferences:
33.86 ms | 403 KiB | 5 Q