3v4l.org

run code in 300+ PHP versions simultaneously
<?php $abs = "Bob Rob Sue"; $abby = "sometext Bob1:2 is Sue3:4 where Rob2:1 etc"; // escape each word for safe use in a regular expression, then join with pipes $words = str_replace(" ", "|", preg_quote($abs)); // build a regular expression that finds a boundary, a word, \d+:\d+, and a boundary $regex = '/\b(' . $words . ')(\d+:\d+)\b/'; preg_match_all($regex, $abby, $matches, PREG_SET_ORDER); print_r($matches);

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.1rc30.0070.00017.11
8.1rc20.0000.00817.27
8.1rc10.0050.00316.99
8.0.120.0050.00317.04
8.0.110.0070.00017.06
8.0.100.0040.00417.11
8.0.90.0030.00317.02
8.0.80.0090.00916.99
8.0.70.0040.00416.87
8.0.60.0000.00717.04
8.0.50.0070.00016.96
8.0.30.0100.01417.44
8.0.20.0140.00817.43
8.0.10.0040.00417.15
8.0.00.0100.01016.84
7.4.250.0060.00316.68
7.4.240.0030.00316.75
7.4.230.0000.00716.77
7.4.220.0020.00516.59
7.4.210.0050.01116.70
7.4.200.0070.00016.41
7.4.130.0120.00916.58
7.4.120.0160.00416.78
7.4.110.0080.01216.63
7.4.100.0110.00516.75
7.4.90.0090.00916.61
7.4.80.0070.01019.39
7.4.70.0140.01016.50
7.4.60.0100.01016.57
7.4.50.0110.01516.43
7.4.40.0140.00416.76
7.4.30.0140.00616.46
7.4.20.0090.00916.46
7.4.10.0040.01716.43
7.4.00.0130.00316.77
7.3.310.0040.00416.36
7.3.300.0000.00616.39
7.3.290.0090.00816.41
7.3.280.0120.00616.31
7.3.260.0130.01016.68
7.3.230.0210.01316.61
7.3.210.0090.00916.51
7.3.200.0060.01216.66
7.3.190.0030.01616.66
7.3.180.0030.01416.57
7.3.170.0120.00916.43
7.3.160.0110.00716.08
7.3.150.0090.00916.46
7.3.140.0150.00316.39
7.3.130.0100.00716.79
7.3.120.0040.01216.47
7.3.110.0150.00516.27
7.3.100.0100.01316.42
7.3.90.0090.01116.55
7.3.80.0090.01216.54
7.3.70.0160.01016.43
7.3.60.0100.01016.44
7.3.50.0140.00316.45
7.3.40.0120.00616.39
7.3.30.0130.00316.52
7.3.20.0110.00516.50
7.3.10.0060.01116.60
7.3.00.0060.01216.49
7.2.330.0030.01416.73
7.2.320.0100.00716.51
7.2.310.0120.00616.70
7.2.300.0170.00316.59
7.2.290.0110.00916.68
7.2.280.0040.01416.66
7.2.270.0140.00416.75
7.2.260.0070.01116.68
7.2.250.0090.00916.73
7.2.240.0140.00916.63
7.2.230.0150.00916.90
7.2.220.0130.00716.75
7.2.210.0130.01016.70
7.2.200.0150.00316.64
7.2.190.0130.00616.62
7.2.180.0140.00316.70
7.2.170.0100.00916.63
7.2.160.0070.01016.82
7.2.150.0060.01116.69
7.2.140.0040.01616.52
7.2.130.0120.01416.84
7.2.120.0030.01416.82
7.2.110.0100.01316.72
7.2.100.0040.02016.73
7.2.90.0160.00816.58
7.2.80.0210.00316.78
7.2.70.0100.01016.70
7.2.60.0140.00716.75
7.2.50.0040.01416.59
7.2.40.0140.00716.63
7.2.30.0100.01316.57
7.2.20.0110.01116.48
7.2.10.0160.00516.63
7.2.00.0240.01416.75

preferences:
29.22 ms | 455 KiB | 5 Q