3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '%(https?://.*)\s%mU'; $str = 'Test text http://hello-world.com Test text http://google.com/file.jpg?google=1 Test text https://hell.o.wor.ld/test?qwe=qwe Test text text text http://test.test/test hello all how are you I hope you all are fine '; $utmUrl = "utm_source=source&utm_medium=email&utm_campaign=mycamp"; preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0); foreach ($matches as $match) $str = preg_replace('%' . $match[1] . '%', $match[1] . (strpos($match[1], '?') !== false ? '&' : '?') . $utmUrl, $str); var_dump($str);

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.60.0090.01316.87
8.3.50.0110.00716.71
8.3.40.0230.00021.60
8.3.30.0090.00918.92
8.3.20.0040.00424.18
8.3.10.0080.00024.66
8.3.00.0050.00326.16
8.2.180.0140.00025.92
8.2.170.0030.01319.16
8.2.160.0120.00322.96
8.2.150.0030.00525.66
8.2.140.0000.00824.66
8.2.130.0000.00726.16
8.2.120.0120.00321.13
8.2.110.0000.00919.39
8.2.100.0040.00817.97
8.2.90.0040.00418.18
8.2.80.0050.00318.16
8.2.70.0040.00417.75
8.2.60.0060.00317.88
8.2.50.0000.00817.88
8.2.40.0040.00419.60
8.2.30.0040.00419.32
8.2.20.0040.00418.25
8.2.10.0000.00821.20
8.2.00.0030.00519.31
8.1.280.0100.01025.92
8.1.270.0040.00423.90
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0110.00719.59
8.1.230.0060.00620.89
8.1.220.0000.00917.89
8.1.210.0000.00818.96
8.1.200.0100.00017.47
8.1.190.0030.00517.60
8.1.180.0050.00318.10
8.1.170.0040.00417.65
8.1.160.0050.00219.06
8.1.150.0000.00718.95
8.1.140.0040.00418.82
8.1.130.0040.00420.07
8.1.120.0080.00017.54
8.1.110.0000.00817.59
8.1.100.0040.00417.64
8.1.90.0000.00717.53
8.1.80.0060.00317.53
8.1.70.0000.00717.66
8.1.60.0000.00917.73
8.1.50.0000.00817.62
8.1.40.0080.00017.64
8.1.30.0030.00517.72
8.1.20.0040.00417.83
8.1.10.0040.00417.76
8.1.00.0000.00817.70
8.0.300.0030.00619.98
8.0.290.0070.00016.88
8.0.280.0000.00718.42
8.0.270.0030.00316.95
8.0.260.0070.00020.18
8.0.250.0030.00317.14
8.0.240.0000.00617.03
8.0.230.0040.00417.09
8.0.220.0070.00017.03
8.0.210.0040.00417.09
8.0.200.0040.00417.14
8.0.190.0040.00417.06
8.0.180.0040.00417.11
8.0.170.0090.00016.98
8.0.160.0000.00717.11
8.0.150.0050.00317.05
8.0.140.0000.00717.08
8.0.130.0030.00313.54
8.0.120.0040.00417.13
8.0.110.0000.00716.95
8.0.100.0050.00317.05
8.0.90.0040.00417.06
8.0.80.0080.01217.06
8.0.70.0050.00317.05
8.0.60.0040.00417.00
8.0.50.0000.00817.04
8.0.30.0100.00717.27
8.0.20.0100.00717.28
8.0.10.0050.00217.17
8.0.00.0100.00716.88
7.4.330.0020.00215.55
7.4.320.0000.00716.81
7.4.300.0030.00316.76
7.4.290.0030.00616.80
7.4.280.0000.00816.68
7.4.270.0030.00316.66
7.4.260.0000.00613.55
7.4.250.0040.00416.80
7.4.240.0000.00716.68
7.4.230.0040.00416.80
7.4.220.0040.00316.76
7.4.210.0050.01016.90
7.4.200.0000.00816.49
7.4.130.0050.01516.71
7.4.120.0090.00916.56
7.4.110.0090.00916.60
7.4.100.0120.00616.70
7.4.90.0160.00416.41
7.4.80.0120.00616.34
7.4.70.0070.01116.35
7.4.60.0150.00916.33
7.4.50.0130.01316.58
7.4.40.0070.01416.72
7.4.30.0130.00916.50
7.4.20.0120.00616.54
7.4.10.0120.00616.44
7.4.00.0110.00716.70
7.3.330.0050.00216.48
7.3.320.0000.00813.23
7.3.310.0070.00016.55
7.3.300.0000.00716.53
7.3.290.0070.00916.45
7.3.260.0130.00416.79
7.3.230.0240.00416.50
7.3.220.0140.00716.84
7.3.210.0030.01816.73
7.3.200.0150.00616.48
7.3.190.0070.01816.61
7.3.180.0130.00616.52
7.3.170.0160.01016.51
7.3.160.0110.00816.84
7.3.150.0120.00616.46
7.3.140.0060.01316.75
7.3.130.0100.01016.35
7.3.120.0090.00916.43
7.3.110.0170.00316.39
7.3.100.0070.01116.72
7.3.90.0190.00316.52
7.3.80.0190.00016.50
7.3.70.0110.00816.51
7.3.60.0150.00416.46
7.3.50.0130.00716.53
7.3.40.0110.00816.64
7.3.30.0130.00716.56
7.3.20.0190.00316.46
7.3.10.0130.01016.66
7.3.00.0130.00816.43
7.2.340.0130.01016.77
7.2.330.0030.01616.59
7.2.320.0130.00716.68
7.2.310.0080.01216.73
7.2.300.0170.01016.86
7.2.290.0120.01516.59
7.2.280.0170.00316.54
7.2.270.0100.01016.59
7.2.260.0070.01316.83
7.2.250.0110.01116.70
7.2.240.0130.00616.71
7.2.230.0120.00916.60
7.2.220.0030.01616.67
7.2.210.0130.00716.71
7.2.200.0140.00616.57
7.2.190.0060.01516.75
7.2.180.0100.01016.73
7.2.170.0110.01016.69
7.2.160.0130.01016.60
7.2.150.0140.01016.67
7.2.140.0160.00416.78
7.2.130.0090.01216.80
7.2.120.0150.00616.85
7.2.110.0090.01216.88
7.2.100.0120.00916.82
7.2.90.0100.00916.87
7.2.80.0230.00316.79
7.2.70.0100.01116.57
7.2.60.0100.01016.76
7.2.50.0080.01216.82
7.2.40.0160.00916.92
7.2.30.0150.00416.95
7.2.20.0070.01416.78
7.2.10.0140.00716.88
7.2.00.0110.01116.54

preferences:
59.57 ms | 400 KiB | 5 Q