3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re ='/(?:(?:https?|ftp|file):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$])/im'; $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[0] . '%', $match[0] . (strpos($match[0], '?') !== false ? '&' : '?') . $utmUrl, $str); var_dump($str);
based on 4Qt9e

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.0.30.0060.01917.40
8.0.20.0110.00817.38
8.0.00.0090.00917.14
7.4.130.0120.00616.82
7.4.120.0200.00516.56
7.4.110.0080.01116.75
7.4.100.0080.01116.78
7.4.90.0150.01016.77
7.4.80.0100.00816.70
7.4.70.0110.00916.77
7.4.60.0140.00716.44
7.4.50.0130.00616.67
7.4.40.0130.00516.46
7.4.30.0120.00616.52
7.4.20.0090.01016.67
7.4.10.0140.00516.67
7.4.00.0130.00616.73
7.3.260.0150.00616.68
7.3.230.0090.00916.61
7.3.220.0080.01016.71
7.3.210.0110.00816.64
7.3.200.0100.00916.60
7.3.190.0120.00916.43
7.3.180.0130.00616.52
7.3.170.0110.00716.46
7.3.160.0090.00916.48
7.3.150.0080.01016.73
7.3.140.0100.00716.50
7.3.130.0110.01516.52
7.3.120.0110.00716.54
7.3.110.0090.01016.67
7.3.100.0070.01116.58
7.3.90.0110.00716.57
7.3.80.0130.00716.71
7.3.70.0120.00816.49
7.3.60.0090.01016.42
7.3.50.0130.00916.44
7.3.40.0110.00616.45
7.3.30.0110.00916.59
7.3.20.0140.00816.61
7.3.10.0120.00616.56
7.3.00.0110.00816.63
7.2.340.0130.00416.78
7.2.330.0100.01116.89
7.2.320.0090.01116.80
7.2.310.0080.01116.67
7.2.300.0110.00716.71
7.2.290.0080.00916.73
7.2.280.0120.00616.68
7.2.270.0100.01016.73
7.2.260.0110.00816.72
7.2.250.0100.01416.75
7.2.240.0130.00616.78
7.2.230.0090.01216.75
7.2.220.0100.00816.86
7.2.210.0100.01016.68
7.2.200.0100.01116.76
7.2.190.0110.01016.73
7.2.180.0130.00716.67
7.2.170.0110.00916.78
7.2.160.0080.01016.85
7.2.150.0110.01016.83
7.2.140.0150.01116.92
7.2.130.0110.01016.86
7.2.120.0120.01116.73
7.2.110.0160.00516.78
7.2.100.0120.00916.82
7.2.90.0080.01216.78
7.2.80.0130.00716.87
7.2.70.0120.00916.79
7.2.60.0100.00916.77
7.2.50.0070.01216.88
7.2.40.0120.00716.88
7.2.30.0130.00716.88
7.2.20.0110.00816.79
7.2.10.0110.01116.83
7.2.00.0130.00816.82