3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "Lorem Ipsum is simply one dummy text of the printing and two typesetting industry. Lorem Ipsum has been the industry's one standard dummy text ever since the three 1500s."; $keys = ['one', 'two', 'three']; $escaped = implode('|', array_map('preg_quote', $keys)); preg_match_all('#\b(' . $escaped . ')\b\s*\K.*?(?=\s*(?:$|\b(?:' . $escaped . ')\b))#', $text, $m, PREG_SET_ORDER); var_export(array_column($m, 0, 1));

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.10.0160.00417.00
8.5.00.0150.00720.33
8.4.150.0020.00014.05
8.4.140.0080.01217.97
8.4.130.0140.00719.63
8.4.120.0160.00422.64
8.4.110.0120.00722.38
8.4.100.0100.00724.18
8.4.90.0140.00718.77
8.4.80.0110.00719.76
8.4.70.0130.00318.31
8.4.60.0140.00718.67
8.4.50.0120.01018.57
8.4.40.0130.00617.66
8.4.30.0130.00718.43
8.4.20.0070.01018.00
8.4.10.0060.00319.74
8.3.280.0120.00818.64
8.3.270.0100.01016.80
8.3.260.0130.00616.73
8.3.250.0090.00618.96
8.3.240.0130.00617.25
8.3.230.0100.01116.66
8.3.220.0100.00917.30
8.3.210.0150.00518.29
8.3.200.0030.00516.78
8.3.190.0060.00817.30
8.3.180.0050.00316.73
8.3.170.0000.01518.74
8.3.160.0140.00318.73
8.3.150.0040.00418.70
8.3.140.0090.00018.90
8.3.130.0080.00018.30
8.3.120.0060.00320.80
8.3.110.0160.00316.75
8.3.100.0030.00724.06
8.3.90.0040.00726.77
8.3.80.0050.00516.88
8.3.70.0090.00918.43
8.3.60.0120.00316.50
8.3.50.0090.01218.47
8.3.40.0070.00722.04
8.3.30.0090.00919.14
8.3.20.0020.00524.18
8.3.10.0030.00524.66
8.3.00.0080.00426.16
8.2.290.0100.00920.54
8.2.280.0110.00918.58
8.2.270.0070.00417.21
8.2.260.0140.00320.44
8.2.250.0040.00416.90
8.2.240.0000.00916.98
8.2.230.0030.01020.94
8.2.220.0090.00037.54
8.2.210.0110.00726.77
8.2.200.0000.01016.88
8.2.190.0120.00316.63
8.2.180.0070.01116.63
8.2.170.0090.00618.91
8.2.160.0100.00722.96
8.2.150.0000.00825.66
8.2.140.0030.00524.66
8.2.130.0020.00526.16
8.2.120.0050.00321.13
8.2.110.0160.00622.24
8.2.100.0140.00720.75
8.2.90.0080.01518.95
8.2.80.0100.01318.97
8.2.70.0030.00719.02
8.2.60.0130.01019.03
8.2.50.0100.00018.93
8.2.40.0030.00619.03
8.2.30.0120.00918.88
8.2.20.0100.01018.83
8.2.10.0030.00718.97
8.2.00.0060.00318.96
8.1.330.0120.00621.92
8.1.320.0120.00916.32
8.1.310.0090.00916.67
8.1.300.0060.00318.54
8.1.290.0090.00030.84
8.1.280.0130.00325.92
8.1.270.0030.00624.66
8.1.260.0040.00726.35
8.1.250.0080.00028.09
8.1.240.0070.01018.57
8.1.230.0070.00318.70
8.1.220.0030.00618.77
8.1.210.0050.00520.04
8.1.200.0000.01018.47
8.1.190.0050.00520.42
8.1.180.0140.00420.50
8.1.170.0190.00320.48
8.1.160.0050.00520.48
8.1.150.0090.00918.71
8.1.140.0110.00018.63
8.1.130.0070.01118.64
8.1.120.0170.00718.75
8.1.110.0120.00018.67
8.1.100.0070.01018.68
8.1.90.0140.00718.70
8.1.80.0150.00018.67
8.1.70.0030.00718.88
8.1.60.0080.00318.78
8.1.50.0030.00718.81
8.1.40.0030.00618.80
8.1.30.0030.00618.90
8.1.20.0000.01018.99
8.1.10.0140.00718.77
8.1.00.0090.00018.60
8.0.300.0030.00618.07
8.0.290.0100.00317.90
8.0.280.0180.00418.04
8.0.270.0090.00918.03
8.0.260.0110.01118.00
8.0.250.0170.00318.15
8.0.240.0170.00318.14
8.0.230.0100.00718.02
8.0.220.0000.01217.98
8.0.210.0100.01017.89
8.0.200.0090.00317.94
8.0.190.0200.00018.01
8.0.180.0150.00318.07
8.0.170.0110.00718.10
8.0.160.0040.00818.01
8.0.150.0090.00017.84
8.0.140.0140.00717.84
8.0.130.0070.00317.93
8.0.120.0090.00018.06
8.0.110.0060.00318.08
8.0.100.0100.00017.96
8.0.90.0030.00617.95
8.0.80.0090.00018.01
8.0.70.0090.00017.83
8.0.60.0060.00318.00
8.0.50.0150.00617.86
8.0.30.0060.00318.09
8.0.20.0030.00618.18
8.0.10.0100.00018.04

preferences:
109.72 ms | 403 KiB | 5 Q