3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'An aim is a goal or objective Hotel in Canada to achieve in life. In order to succeed in life, one must have Hotel in, Canada a goal. My aim in life is to be a teacher. Teaching is a noble and responsible profession. I have come City Hotels to know that the ever-increasing misery and distress, are City, Hotels due to the ignorance and illiteracy City. Hotels of the people of our country. So I have decided to spread education among the masses Hotel. in Canada as much as possible within my humble power. As a teacher, I shall try my best to impart man-making education.'; $keywords = ['City Hotels', 'Hotel in Canada']; foreach ($keywords as $keyword) { $regex = preg_replace('/ +/', '[.,\s]+', preg_quote($keyword, '/')); $string = preg_replace("/\b$regex\b/iu", '**$0**', $string); } var_export($string);

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.0100.01220.01
8.4.150.0020.00014.05
8.4.140.0150.01117.89
8.4.130.0100.00918.01
8.4.120.0130.00818.61
8.4.110.0100.01120.69
8.4.100.0120.00917.75
8.4.90.0070.00820.31
8.4.80.0140.00618.87
8.4.70.0030.00519.17
8.4.60.0120.00918.88
8.4.50.0120.00718.58
8.4.40.0120.00919.89
8.4.30.0070.01020.25
8.4.20.0100.01018.00
8.4.10.0160.00320.53
8.3.280.0160.00518.61
8.3.270.0120.00716.75
8.3.260.0110.00916.98
8.3.250.0120.00916.81
8.3.240.0110.00916.63
8.3.230.0100.00516.78
8.3.220.0110.00819.01
8.3.210.0140.00617.09
8.3.200.0050.00416.80
8.3.190.0090.00617.48
8.3.180.0110.00719.14
8.3.170.0180.00018.72
8.3.160.0090.00918.80
8.3.150.0110.00717.30
8.3.140.0140.00416.96
8.3.130.0040.00418.58
8.3.120.0030.00620.61
8.3.110.0000.00816.61
8.3.100.0100.00016.72
8.3.90.0080.00026.77
8.3.80.0060.00316.88
8.3.70.0240.01216.63
8.3.60.0140.00316.75
8.3.50.0100.01020.04
8.3.40.0140.00020.91
8.3.30.0130.00619.10
8.3.20.0070.00024.18
8.3.10.0030.00524.66
8.3.00.0040.00426.16
8.2.290.0140.00617.18
8.2.280.0050.00318.43
8.2.270.0110.00717.13
8.2.260.0130.00317.00
8.2.250.0040.00416.77
8.2.240.0040.00417.21
8.2.230.0000.00820.94
8.2.220.0030.00624.06
8.2.210.0070.01126.77
8.2.200.0100.00016.75
8.2.190.0150.00316.60
8.2.180.0060.01225.92
8.2.170.0070.01419.14
8.2.160.0140.00322.96
8.2.150.0040.00425.66
8.2.140.0050.00324.66
8.2.130.0000.00826.16
8.2.120.0040.00419.48
8.2.110.0100.00021.30
8.2.100.0090.00318.03
8.2.90.0040.00719.09
8.2.80.0030.00517.97
8.2.70.0040.00417.75
8.2.60.0040.00417.75
8.2.50.0030.00617.98
8.2.40.0070.00018.28
8.2.30.0070.00018.14
8.2.20.0040.00420.34
8.2.10.0000.00718.09
8.2.00.0080.00319.46
8.1.330.0080.00316.62
8.1.320.0060.00616.32
8.1.310.0070.01118.05
8.1.300.0090.00018.55
8.1.290.0040.00730.84
8.1.280.0090.00625.92
8.1.270.0060.00323.91
8.1.260.0030.00626.35
8.1.250.0080.00028.09
8.1.240.0040.00423.82
8.1.230.0120.00320.98
8.1.220.0050.00317.91
8.1.210.0070.00318.85
8.1.200.0030.00617.50
8.1.190.0000.00817.38
8.1.180.0040.00418.10
8.1.170.0050.00317.62
8.1.160.0080.00018.90
8.1.150.0030.00618.80
8.1.140.0050.00317.58
8.1.130.0040.00418.99
8.1.120.0050.00317.51
8.1.110.0020.00517.60
8.1.100.0000.00717.61
8.1.90.0060.00317.60
8.1.80.0090.00017.64
8.1.70.0000.00717.58
8.1.60.0060.00317.76
8.1.50.0000.00817.68
8.1.40.0100.00317.56
8.1.30.0200.00417.70
8.1.20.0180.00617.77
8.1.10.0210.00317.65
8.1.00.0210.00317.55
8.0.300.0050.00219.77
8.0.290.0030.00516.88
8.0.280.0000.00718.48
8.0.270.0060.00316.97
8.0.260.0030.00318.52
8.0.250.0070.00017.16
8.0.240.0000.00717.07
8.0.230.0070.00017.11
8.0.220.0030.00317.05
8.0.210.0050.00317.17
8.0.200.0040.00417.06
8.0.190.0040.00417.11
8.0.180.0040.00417.12
8.0.170.0120.00717.07
8.0.160.0150.00417.01
8.0.150.0150.00517.02
8.0.140.0200.00017.03
8.0.130.0160.00416.86
8.0.120.0170.00217.10
8.0.110.0140.00617.18
8.0.100.0160.00716.99
8.0.90.0150.00616.95
8.0.80.0070.00717.02
8.0.70.0040.00717.13
8.0.60.0140.00517.05
8.0.50.0090.00617.11
8.0.30.0140.00417.13
8.0.20.0040.01317.18
8.0.10.0130.00517.19
7.4.330.0030.00315.55
7.4.320.0030.00316.94
7.4.300.0000.00616.84
7.4.290.0070.00016.60
7.4.280.0200.00016.83
7.4.270.0270.00916.82
7.4.260.0160.00716.79
7.4.250.0160.00316.77
7.4.240.0050.00516.76
7.4.230.0050.00516.76
7.4.220.0090.00516.87
7.4.210.0140.00316.90
7.4.200.0120.00316.76
7.4.190.0140.00516.89
7.4.180.0090.00916.79
7.4.160.0160.00316.64
7.4.150.0110.00516.82
7.4.140.0120.00816.62
7.4.130.0200.00016.75
7.4.120.0140.00516.70
7.4.110.0110.00716.65
7.4.100.0170.00316.82
7.4.90.0110.00816.70
7.4.80.0140.00516.62
7.4.70.0150.00416.62
7.4.60.0110.00316.70
7.4.50.0160.00316.49
7.4.40.0120.00416.61
7.4.30.0170.00016.65
7.4.20.0140.00016.49
7.4.10.0160.00016.48
7.4.00.0140.00516.63

preferences:
36.8 ms | 403 KiB | 5 Q