3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "hello this is a string and hello but this is a string hello but this is a string and "; if (preg_match_all('~(?=(\b(\w.{9,})(?=.*?\b\2)))~u', $string, $m)) { echo array_reduce($m[1], function ($a, $b) { return strlen($a ?? '') > strlen($b ?? '') ? $a : $b; }); }

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.80.0030.00716.74
8.3.70.0110.00416.75
8.3.60.0030.01318.55
8.3.50.0100.01018.66
8.3.40.0140.00720.26
8.3.30.0090.00619.17
8.3.20.0040.00424.18
8.3.10.0000.00924.66
8.3.00.0030.00626.16
8.2.200.0060.00316.75
8.2.190.0130.01017.00
8.2.180.0130.00325.92
8.2.170.0070.00719.13
8.2.160.0060.00922.96
8.2.150.0060.00325.66
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0040.00426.16
8.2.110.0060.00320.45
8.2.100.0100.00618.16
8.2.90.0150.00517.81
8.2.80.0130.00618.31
8.2.70.0100.00917.61
8.2.60.0140.00517.64
8.2.50.0160.00517.79
8.2.40.0150.00318.05
8.2.30.0070.01117.85
8.2.20.0110.00919.06
8.2.10.0110.00717.88
8.2.00.0080.00918.64
8.1.290.0050.00518.88
8.1.280.0190.00325.92
8.1.270.0100.00723.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00318.97
8.1.230.0090.00317.69
8.1.220.0110.00717.58
8.1.210.0180.00118.00
8.1.200.0120.00717.47
8.1.190.0160.00617.31
8.1.180.0140.00417.61
8.1.170.0130.00618.04
8.1.160.0110.00918.18
8.1.150.0110.00718.13
8.1.140.0120.00617.52
8.1.130.0110.00718.12
8.1.120.0150.00317.56
8.1.110.0110.00717.44
8.1.100.0120.00517.56
8.1.90.0120.00617.60
8.1.80.0110.00617.58
8.1.70.0110.00717.62
8.1.60.0130.00617.67
8.1.50.0110.01117.46
8.1.40.0180.00117.67
8.1.30.0140.00417.58
8.1.20.0170.00417.64
8.1.10.0140.00717.50
8.1.00.0160.00417.53
8.0.300.0140.00517.76
8.0.290.0120.00616.80
8.0.280.0150.00517.66
8.0.270.0170.00117.35
8.0.260.0100.00817.64
8.0.250.0100.00916.95
8.0.240.0090.01016.88
8.0.230.0130.00516.86
8.0.220.0140.00316.78
8.0.210.0100.00816.77
8.0.200.0110.00716.87
8.0.190.0100.00716.89
8.0.180.0120.00716.86
8.0.170.0110.00817.03
8.0.160.0210.00216.70
8.0.150.0210.00316.85
8.0.140.0200.00516.79
8.0.130.0210.00416.83
8.0.120.0230.00116.99
8.0.110.0150.00816.96
8.0.100.0150.01116.92
8.0.90.0180.00616.89
8.0.80.0200.00516.88
8.0.70.0140.01116.96
8.0.60.0270.00317.04
8.0.50.0180.00716.78
8.0.30.0170.00716.91
8.0.20.0190.00516.97
8.0.10.0190.00616.98
7.4.330.0120.00016.05
7.4.320.0110.00516.69
7.4.300.0120.00316.67
7.4.290.0110.00516.68
7.4.280.0220.00316.69
7.4.270.0180.00316.70
7.4.260.0180.00416.66
7.4.250.0200.00616.65
7.4.240.0170.00416.73
7.4.230.0200.00616.70
7.4.220.0180.00216.66
7.4.210.0210.00316.67
7.4.200.0200.00616.73
7.4.190.0240.00016.66
7.4.180.0180.00416.67
7.4.160.0150.00716.70
7.4.150.0170.00516.67
7.4.140.0160.00516.69
7.4.130.0170.00516.60
7.4.120.0180.00616.65
7.4.110.0140.00616.58
7.4.100.0200.00316.72
7.4.90.0190.00516.60
7.4.80.0130.00816.64
7.4.70.0150.00616.69
7.4.60.0140.00516.59
7.4.50.0140.00716.61
7.4.40.0140.00716.60
7.4.30.0190.00416.59
7.4.20.0140.01116.61
7.4.10.0180.00416.63
7.4.00.0090.00916.59

preferences:
28.57 ms | 401 KiB | 5 Q