3v4l.org

run code in 500+ PHP versions simultaneously
<?php $re = '/^(\S+)\h+\[\S*\](?!\S).*$(?![\s\S]*^\1)/m'; $str = 'green [foo] [foo1] red [foo] blue [foo] [foo1] [foo2] yellow [foo2] green [foo] green [foo] [foo1] red [foo] pink [foo3]'; preg_match_all($re, $str, $matches); print_r($matches[0]);

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.70.0100.00716.91
8.5.60.0130.00616.76
8.5.50.0080.01016.75
8.5.30.0090.00819.07
8.5.20.0130.00619.61
8.5.10.0140.00916.95
8.5.00.0100.01119.86
8.4.210.0140.00619.70
8.4.180.0150.00721.99
8.4.170.0120.01019.75
8.4.160.0120.01123.60
8.4.150.0100.00517.75
8.4.140.0120.00917.53
8.4.130.0140.00518.21
8.4.120.0110.00820.78
8.4.110.0070.00918.84
8.4.100.0110.00918.06
8.4.90.0050.00417.85
8.4.80.0090.01218.11
8.4.70.0130.00917.86
8.4.60.0140.00718.59
8.4.50.0130.00917.72
8.4.40.0050.00317.95
8.4.30.0110.00720.55
8.4.20.0030.00719.86
8.4.10.0060.00318.08
8.3.300.0150.00620.44
8.3.290.0120.00918.46
8.3.280.0040.00216.30
8.3.270.0110.00816.93
8.3.260.0100.00916.78
8.3.250.0100.00918.82
8.3.240.0150.00416.70
8.3.230.0060.00216.87
8.3.220.0110.00816.95
8.3.210.0080.00516.50
8.3.200.0110.00816.77
8.3.190.0100.00917.05
8.3.180.0070.00816.74
8.3.170.0110.00716.64
8.3.160.0180.00018.35
8.3.150.0090.00917.08
8.3.140.0040.00420.68
8.3.130.0050.00318.29
8.3.120.0000.00818.78
8.3.110.0080.00020.94
8.3.100.0040.00424.06
8.3.90.0040.00426.77
8.3.80.0030.00616.75
8.3.70.0070.01016.75
8.3.60.0120.00318.42
8.3.50.0090.01218.07
8.3.40.0140.00319.08
8.3.30.0070.00718.79
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.300.0060.00418.30
8.2.290.0100.00920.42
8.2.280.0070.00118.75
8.2.270.0120.00816.98
8.2.260.0040.00418.86
8.2.250.0030.00618.52
8.2.240.0040.00419.24
8.2.230.0040.00422.58
8.2.220.0070.00337.54
8.2.210.0040.00426.77
8.2.200.0130.00316.63
8.2.190.0110.00416.75
8.2.180.0120.00325.92
8.2.170.0030.01318.96
8.2.160.0110.00322.96
8.2.150.0000.00725.66
8.2.140.0050.00324.66
8.2.130.0000.00826.16
8.2.120.0040.00426.16
8.2.110.0030.00622.39
8.2.100.0000.01317.91
8.2.90.0000.00720.42
8.2.80.0040.00418.89
8.2.70.0000.00817.63
8.2.60.0030.00617.80
8.2.50.0040.00418.05
8.2.40.0030.00519.60
8.2.30.0000.00817.75
8.2.20.0040.00319.49
8.2.10.0040.00417.71
8.2.00.0040.00419.09
8.1.340.0100.01117.67
8.1.330.0100.00916.75
8.1.320.0120.00816.38
8.1.310.0080.00016.66
8.1.300.0100.01017.99
8.1.290.0140.00018.88
8.1.280.0110.00425.92
8.1.270.0080.00023.99
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0040.00418.78
8.1.230.0000.01117.89
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00717.35
8.1.190.0080.00017.35
8.1.180.0000.00818.10
8.1.170.0030.00517.62
8.1.160.0040.00418.77
8.1.150.0000.00718.73
8.1.140.0020.00517.55
8.1.130.0000.00718.91
8.1.120.0030.00517.45
8.1.110.0000.00817.56
8.1.100.0030.00517.52
8.1.90.0040.00417.55
8.1.80.0040.00417.39
8.1.70.0030.00317.54
8.1.60.0030.00517.66
8.1.50.0030.00517.61
8.1.40.0100.00017.52
8.1.30.0000.00817.72
8.1.20.0040.00417.73
8.1.10.0060.00317.71
8.1.00.0000.00817.73
8.0.300.0070.00018.77
8.0.290.0030.00716.75
8.0.280.0030.00318.11
8.0.270.0040.00416.81
8.0.260.0030.00318.47
8.0.250.0000.00716.95
8.0.240.0000.00617.04
8.0.230.0000.00717.05
8.0.220.0080.00016.99
8.0.210.0080.00017.00
8.0.200.0090.00017.08
8.0.190.0040.00417.02
8.0.180.0080.00416.86
8.0.170.0050.00316.89
8.0.160.0070.00016.85
8.0.150.0000.00716.86
8.0.140.0030.00416.97
8.0.130.0030.00313.42
8.0.120.0030.00513.45
8.0.110.0130.00013.34
8.0.100.0110.00313.38
8.0.90.0070.00613.41
8.0.80.0130.00013.30
8.0.70.0060.00613.44
8.0.60.0080.00413.41
8.0.50.0040.00813.37
8.0.30.0090.00313.43
8.0.20.0090.00413.39
8.0.10.0130.00013.39
8.0.00.0050.00313.48
7.4.330.0000.00515.55
7.4.320.0030.00316.67
7.4.300.0000.00616.77
7.4.290.0040.00416.71
7.4.280.0050.00216.54
7.4.270.0040.00416.67
7.4.260.0000.00513.43
7.4.250.0070.00013.47
7.4.240.0120.00313.43
7.4.230.0170.00013.50
7.4.220.0040.00913.34
7.4.210.0100.00413.46
7.4.200.0070.00713.35
7.4.190.0110.00213.43
7.4.180.0070.00713.48
7.4.160.0070.00713.50
7.4.150.0140.00013.53
7.4.140.0060.00913.47
7.4.130.0120.00013.41
7.4.120.0070.00513.45
7.4.110.0080.00413.38
7.4.100.0120.00013.51
7.4.90.0090.00313.47
7.4.80.0040.00813.47
7.4.70.0080.00413.41
7.4.60.0060.00613.50
7.4.50.0100.00213.27
7.4.40.0070.00413.28
7.4.30.0120.00013.43
7.4.20.0040.00813.31
7.4.10.0080.00313.30
7.4.00.0140.00013.29
7.3.330.0000.00716.45
7.3.320.0110.00313.17
7.3.310.0070.00713.03
7.3.300.0100.00313.24
7.3.290.0090.00313.30
7.3.280.0080.00513.27
7.3.270.0130.00013.02
7.3.260.0060.00613.26
7.3.250.0140.00013.00
7.3.240.0080.00513.20
7.3.230.0100.00012.99
7.3.220.0110.00013.18
7.3.210.0090.00512.95
7.3.200.0100.00013.25
7.3.190.0090.00312.89
7.3.180.0110.00013.17
7.3.170.0080.00413.01
7.3.160.0090.00013.10
7.3.150.0110.00013.21
7.3.140.0060.00612.88
7.3.130.0110.00013.04
7.3.120.0090.00313.06
7.3.110.0060.00413.05
7.3.100.0070.00313.11
7.3.90.0110.00013.48
7.3.80.0090.00413.17
7.3.70.0090.00313.24
7.3.60.0090.00313.37
7.3.50.0050.01013.21
7.3.40.0090.00313.20
7.3.30.0090.00313.41
7.3.20.0070.00414.84
7.3.10.0150.00314.93
7.3.00.0130.00314.96

preferences:
46.26 ms | 1435 KiB | 5 Q