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"; $str = preg_replace_callback($re, function ($match) use ($utmUrl) { return $match[0] . (strpos($match[0], '?') !== 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.0150.00616.74
8.3.50.0040.01116.52
8.3.40.0130.00623.43
8.3.30.0070.00718.78
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.180.0070.01025.92
8.2.170.0120.00319.26
8.2.160.0100.00322.96
8.2.150.0040.00425.66
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0040.00420.93
8.2.110.0060.01220.51
8.2.100.0080.00317.91
8.2.90.0030.00618.00
8.2.80.0060.00317.97
8.2.70.0000.00818.04
8.2.60.0000.00818.05
8.2.50.0000.00918.07
8.2.40.0090.00018.35
8.2.30.0040.00418.25
8.2.20.0000.00718.32
8.2.10.0000.00819.32
8.2.00.0020.00519.44
8.1.280.0070.00725.92
8.1.270.0000.00824.66
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0070.00323.86
8.1.230.0110.00022.69
8.1.220.0000.00817.91
8.1.210.0080.00018.77
8.1.200.0050.00517.60
8.1.190.0030.00617.65
8.1.180.0000.00818.10
8.1.170.0000.00818.67
8.1.160.0080.00018.86
8.1.150.0000.00818.95
8.1.140.0040.00418.86
8.1.130.0000.00717.54
8.1.120.0000.00817.64
8.1.110.0040.00417.66
8.1.100.0050.00217.65
8.1.90.0030.00517.53
8.1.80.0070.00017.66
8.1.70.0030.00317.53
8.1.60.0000.00817.65
8.1.50.0060.00317.60
8.1.40.0040.00417.61
8.1.30.0040.00417.70
8.1.20.0040.00417.78
8.1.10.0060.00317.78
8.1.00.0000.00817.69
8.0.300.0030.00518.77
8.0.290.0070.00017.00
8.0.280.0050.00218.50
8.0.270.0000.00718.18
8.0.260.0000.00717.00
8.0.250.0080.00017.16
8.0.240.0000.00717.14
8.0.230.0040.00417.02
8.0.220.0000.00817.10
8.0.210.0040.00416.93
8.0.200.0030.00517.09
8.0.190.0030.00317.14
8.0.180.0030.00717.11
8.0.170.0060.00316.97
8.0.160.0070.00017.12
8.0.150.0040.00417.01
8.0.140.0040.00416.94
8.0.130.0000.00513.52
8.0.120.0030.00517.06
8.0.110.0000.00717.06
8.0.100.0030.00516.89
8.0.90.0070.00017.07
8.0.80.0050.01317.09
8.0.70.0040.00416.95
8.0.60.0000.00717.05
8.0.50.0030.00617.07
8.0.30.0030.01617.04
8.0.20.0120.01117.25
8.0.10.0000.00817.08
8.0.00.0060.01217.03
7.4.330.0050.00015.55
7.4.320.0030.00316.84
7.4.300.0030.00316.66
7.4.290.0050.00316.73
7.4.280.0080.00316.73
7.4.270.0000.00816.73
7.4.260.0050.00013.38
7.4.250.0070.00016.84
7.4.240.0000.00716.88
7.4.230.0000.00716.84
7.4.220.0040.00416.76
7.4.210.0080.00716.80
7.4.200.0000.00716.69
7.4.130.0090.01016.65
7.4.120.0180.01116.61
7.4.110.0140.00316.45
7.4.100.0100.01116.60
7.4.90.0100.00816.77
7.4.80.0100.01016.71
7.4.70.0130.00816.69
7.4.60.0110.00816.58
7.4.50.0130.00516.59
7.4.40.0090.00916.63
7.4.30.0110.00816.59
7.4.20.0150.00516.62
7.4.10.0130.00516.68
7.4.00.0120.00616.65
7.3.330.0000.00816.63
7.3.320.0000.00613.28
7.3.310.0000.00716.35
7.3.300.0050.00316.53
7.3.290.0090.00516.47
7.3.260.0140.01416.52
7.3.230.0130.00516.68
7.3.220.0080.01216.65
7.3.210.0110.00616.53
7.3.200.0080.01116.58
7.3.190.0060.01116.55
7.3.180.0070.01016.76
7.3.170.0140.00316.46
7.3.160.0110.00816.64
7.3.150.0090.00716.60
7.3.140.0080.00816.57
7.3.130.0080.00816.54
7.3.120.0150.00316.74
7.3.110.0120.00716.50
7.3.100.0080.00916.72
7.3.90.0110.00916.37
7.3.80.0040.01416.52
7.3.70.0120.00716.55
7.3.60.0090.01016.50
7.3.50.0060.01116.34
7.3.40.0120.00616.50
7.3.30.0070.01016.54
7.3.20.0120.00916.54
7.3.10.0110.01216.50
7.3.00.0090.01016.52
7.2.340.0090.00916.75
7.2.330.0090.00916.82
7.2.320.0110.01016.78
7.2.310.0080.01116.74
7.2.300.0050.01216.77
7.2.290.0110.01016.86
7.2.280.0110.00716.76
7.2.270.0080.01216.88
7.2.260.0080.00916.76
7.2.250.0150.00716.69
7.2.240.0110.00916.77
7.2.230.0090.00816.74
7.2.220.0060.01216.68
7.2.210.0060.01316.77
7.2.200.0090.00916.73
7.2.190.0140.00616.81
7.2.180.0100.00916.74
7.2.170.0080.00816.90
7.2.160.0080.01016.90
7.2.150.0080.01016.80
7.2.140.0110.01116.83
7.2.130.0160.00316.71
7.2.120.0150.01216.62
7.2.110.0160.00916.80
7.2.100.0120.01016.69
7.2.90.0070.01516.60
7.2.80.0140.01316.79
7.2.70.0080.01216.60
7.2.60.0100.00916.70
7.2.50.0110.00616.73
7.2.40.0140.00716.77
7.2.30.0090.00916.64
7.2.20.0080.01016.71
7.2.10.0070.01116.71
7.2.00.0060.01216.65

preferences:
60.44 ms | 401 KiB | 5 Q