3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text ="I found some really good articles on such and such topic. Here are a few links to check out: http://www.example.com/hOSDHOUA and https://www.mywebsite.com/h/yIFeelLowIfImHigh and http://example-site.com/today-is-a-beautiful-day/. "; $reg_exUrl = "/(http|https|ftp|ftps)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/"; // The Text you want to filter for urls // I will provide it if needed. // Check if there is a url in the text if(preg_match($reg_exUrl, $text, $url)) { // make the urls hyper links echo preg_replace($reg_exUrl, "<a href={$url[0]}>{$url[0]}</a> ", $text); // <--- Part in question } else { // if no urls in the text just return the text echo $text; }

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.70.0070.00716.75
8.3.60.0060.00920.23
8.3.50.0140.00718.37
8.3.40.0090.00919.08
8.3.30.0120.00318.79
8.3.20.0030.00521.91
8.3.10.0030.00523.64
8.3.00.0040.00421.71
8.2.190.0090.00620.40
8.2.180.0090.00918.43
8.2.170.0140.00322.96
8.2.160.0110.00419.04
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0000.00818.09
8.2.120.0040.00426.35
8.2.110.0030.00621.03
8.2.100.0120.00017.91
8.2.90.0030.00618.34
8.2.80.0000.00817.97
8.2.70.0090.00017.93
8.2.60.0050.00318.16
8.2.50.0040.00418.10
8.2.40.0060.00319.46
8.2.30.0040.00419.35
8.2.20.0080.00018.30
8.2.10.0000.00720.55
8.2.00.0000.00819.37
8.1.280.0070.00725.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.01020.94
8.1.230.0100.00320.84
8.1.220.0080.00017.74
8.1.210.0040.00418.86
8.1.200.0060.00317.48
8.1.190.0000.00817.25
8.1.180.0000.00818.10
8.1.170.0050.00318.49
8.1.160.0040.00418.92
8.1.150.0040.00418.75
8.1.140.0050.00322.23
8.1.130.0000.00720.00
8.1.120.0030.00417.56
8.1.110.0050.00517.50
8.1.100.0080.00017.61
8.1.90.0000.00817.61
8.1.80.0040.00417.64
8.1.70.0030.00517.49
8.1.60.0080.00017.63
8.1.50.0040.00417.64
8.1.40.0000.00817.52
8.1.30.0000.00817.67
8.1.20.0000.00717.81
8.1.10.0000.00817.79
8.1.00.0030.00517.70
8.0.300.0080.00020.16
8.0.290.0060.00317.00
8.0.280.0070.00018.38
8.0.270.0030.00316.91
8.0.260.0000.00718.50
8.0.250.0030.00317.13
8.0.240.0030.00317.16
8.0.230.0040.00417.12
8.0.220.0000.00717.07
8.0.210.0000.00717.03
8.0.200.0030.00317.03
8.0.190.0000.00717.14
8.0.180.0030.00517.09
8.0.170.0060.00317.09
8.0.160.0030.00516.96
8.0.150.0040.00416.98
8.0.140.0000.00717.04
8.0.130.0040.00413.58
8.0.120.0000.00717.02
8.0.110.0070.00016.89
8.0.100.0000.00717.02
8.0.90.0000.00817.11
8.0.80.0140.00717.04
8.0.70.0040.00417.02
8.0.60.0040.00416.87
8.0.50.0000.00817.11
8.0.30.0130.01016.95
8.0.20.0070.01117.27
8.0.10.0000.00717.11
8.0.00.0100.00916.92
7.4.330.0020.00216.86
7.4.320.0070.00016.82
7.4.300.0030.00316.72
7.4.290.0000.00816.63
7.4.280.0000.00716.63
7.4.270.0060.00316.63
7.4.260.0040.00416.76
7.4.250.0030.00516.77
7.4.240.0000.00716.75
7.4.230.0070.00016.72
7.4.220.0000.00816.67
7.4.210.0050.01016.72
7.4.200.0050.00316.77
7.4.160.0080.01116.82
7.4.140.0080.01017.86
7.4.130.0100.01316.73
7.4.120.0120.00916.71
7.4.110.0120.00616.62
7.4.100.0110.00716.60
7.4.90.0180.00616.49
7.4.80.0070.01419.39
7.4.70.0090.01016.74
7.4.60.0090.00916.63
7.4.50.0000.01816.55
7.4.40.0100.00616.55
7.4.00.0100.00314.97
7.3.330.0020.00213.13
7.3.320.0030.00313.13
7.3.310.0040.00316.43
7.3.300.0040.00416.27
7.3.290.0030.00316.41
7.3.280.0080.00816.37
7.3.260.0090.01016.51
7.3.240.0120.00616.56
7.3.230.0130.00716.82
7.3.210.0110.00616.49
7.3.200.0030.01616.70
7.3.190.0040.01816.83
7.3.180.0070.01016.82
7.3.170.0070.01016.75
7.3.160.0080.00816.78
7.3.00.0420.00314.85
7.2.330.0090.00916.89
7.2.320.0300.02616.57
7.2.310.0150.00616.61
7.2.300.0110.00516.81
7.2.290.0060.01216.46
7.2.130.0310.01015.02
7.2.120.0280.00914.72
7.2.110.0210.00614.85
7.2.100.0370.01014.80
7.2.90.0250.00414.85
7.2.80.0290.00715.11
7.2.70.0260.01115.09
7.2.60.0380.01415.29
7.2.50.0200.01015.21
7.2.40.0260.00615.26
7.2.30.0540.00315.11
7.2.20.0300.00315.37
7.2.10.0340.00415.23
7.2.00.1320.01015.31
7.1.250.0340.00714.16
7.0.330.0460.00413.67
5.6.380.0070.01014.56

preferences:
45.81 ms | 401 KiB | 5 Q