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 // Check if there is a url in the text if(preg_match_all($reg_exUrl, $text, $url)) { foreach($url[0] as $link){ $text = str_replace($link, "<a href={$link}>{$link}</a> ", $text); // <--- Part in question } echo $text; } 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.5.10.0140.00516.83
8.5.00.0180.00520.15
8.4.150.0010.00014.05
8.4.140.0120.00817.55
8.4.130.0160.00517.84
8.4.120.0040.00424.03
8.4.110.0080.00720.66
8.4.100.0100.01018.04
8.4.90.0090.01120.55
8.4.80.0040.00518.95
8.4.70.0130.00918.79
8.4.60.0130.00818.70
8.4.50.0110.00923.83
8.4.40.0030.00619.87
8.4.30.0140.00717.56
8.4.20.0080.00020.48
8.4.10.0140.00318.19
8.3.280.0130.00718.64
8.3.270.0100.00916.92
8.3.260.0090.01116.94
8.3.250.0110.00817.10
8.3.240.0130.00717.17
8.3.230.0070.00116.80
8.3.220.0110.00719.16
8.3.210.0070.00816.97
8.3.200.0070.00216.39
8.3.190.0040.00417.10
8.3.180.0040.00418.77
8.3.170.0040.00416.90
8.3.160.0150.00019.14
8.3.150.0120.00619.10
8.3.140.0090.00617.08
8.3.130.0150.00018.30
8.3.120.0040.00419.22
8.3.110.0040.00420.94
8.3.100.0080.00024.06
8.3.90.0070.01426.77
8.3.80.0060.00317.97
8.3.70.0070.00716.75
8.3.60.0090.00620.16
8.3.50.0100.01018.10
8.3.40.0130.00619.10
8.3.30.0110.00418.86
8.3.20.0000.00821.90
8.3.10.0000.00723.62
8.3.00.0000.00821.86
8.2.290.0140.00520.77
8.2.280.0120.00618.49
8.2.270.0100.01018.91
8.2.260.0060.00316.73
8.2.250.0130.00616.68
8.2.240.0060.00318.96
8.2.230.0030.00722.58
8.2.220.0060.00337.54
8.2.210.0110.00426.77
8.2.200.0040.00418.66
8.2.190.0130.00318.59
8.2.180.0150.00318.79
8.2.170.0070.00722.96
8.2.160.0070.00719.16
8.2.150.0070.00724.18
8.2.140.0040.00424.66
8.2.130.0080.00018.21
8.2.120.0040.00426.35
8.2.110.0030.00619.27
8.2.100.0060.00618.16
8.2.90.0080.00018.09
8.2.80.0090.00019.14
8.2.70.0050.00318.00
8.2.60.0080.00017.75
8.2.50.0000.00818.05
8.2.40.0080.00018.05
8.2.30.0040.00419.50
8.2.20.0060.00318.17
8.2.10.0040.00420.55
8.2.00.0050.00319.33
8.1.330.0100.00921.95
8.1.320.0060.00616.48
8.1.310.0070.00718.51
8.1.300.0130.00620.14
8.1.290.0090.00030.84
8.1.280.0140.00025.92
8.1.270.0040.00418.91
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0060.00322.19
8.1.230.0080.00422.64
8.1.220.0080.00017.74
8.1.210.0040.00418.89
8.1.200.0080.00017.47
8.1.190.0060.00317.48
8.1.180.0040.00418.10
8.1.170.0080.00017.62
8.1.160.0050.00218.90
8.1.150.0030.00518.93
8.1.140.0000.00822.25
8.1.130.0040.00420.12
8.1.120.0000.00717.57
8.1.110.0000.01017.59
8.1.100.0070.00017.65
8.1.90.0040.00417.61
8.1.80.0060.00317.60
8.1.70.0030.00317.60
8.1.60.0090.00017.77
8.1.50.0000.00817.78
8.1.40.0000.00717.61
8.1.30.0000.00817.86
8.1.20.0040.00417.80
8.1.10.0000.00817.80
8.1.00.0030.00617.68
8.0.300.0040.00420.25
8.0.290.0040.00416.88
8.0.280.0030.00318.51
8.0.270.0070.00017.37
8.0.260.0030.00318.37
8.0.250.0030.00317.01
8.0.240.0000.00817.02
8.0.230.0000.00817.06
8.0.220.0030.00317.09
8.0.210.0070.00017.07
8.0.200.0000.00817.14
8.0.190.0070.00017.16
8.0.180.0040.00417.04
8.0.170.0040.00417.00
8.0.160.0040.00416.96
8.0.150.0000.01116.93
8.0.140.0040.00417.05
8.0.130.0000.00613.49
8.0.120.0080.00017.08
8.0.110.0000.00717.13
8.0.100.0070.00016.97
8.0.90.0050.00317.04
8.0.80.0060.01417.01
8.0.70.0030.00717.13
8.0.60.0000.00716.89
8.0.50.0050.00317.05
8.0.30.0110.00917.39
8.0.20.0120.01517.38
8.0.10.0000.00817.23
8.0.00.0090.00916.95
7.4.330.0000.00516.80
7.4.320.0060.00316.76
7.4.300.0040.00416.82
7.4.290.0070.00016.83
7.4.280.0050.00216.82
7.4.270.0000.00916.80
7.4.260.0050.00316.80
7.4.250.0000.00816.79
7.4.240.0000.00816.80
7.4.230.0000.00816.54
7.4.220.0000.00816.80
7.4.210.0120.00716.78
7.4.200.0030.00316.72
7.4.160.0150.01416.71
7.4.140.0100.00917.86
7.4.130.0130.01316.93
7.4.120.0070.01016.69
7.4.110.0090.00916.77
7.4.100.0140.00616.60
7.4.90.0000.01816.75
7.4.80.0080.01619.39
7.4.70.0060.01216.82
7.4.60.0130.00316.61
7.4.50.0040.01116.66
7.4.40.0040.01216.43
7.4.00.0070.01115.11
7.3.330.0000.00513.40
7.3.320.0030.00313.22
7.3.310.0000.00716.46
7.3.300.0050.00316.45
7.3.290.0070.00016.49
7.3.280.0100.00716.50
7.3.260.0120.00716.63
7.3.240.0110.00616.62
7.3.230.0060.01116.78
7.3.210.0090.01116.45
7.3.200.0070.01016.48
7.3.190.0120.00916.90
7.3.180.0130.00316.47
7.3.170.0160.00616.84
7.3.160.0050.01316.65
7.3.00.3100.01014.70
7.2.330.0100.00716.86
7.2.320.0100.01016.99
7.2.310.0060.01116.88
7.2.300.0030.01416.78
7.2.290.0150.00916.89
7.2.130.2120.00715.21
7.2.120.0350.00615.18
7.2.110.0150.00914.95
7.2.100.0220.00515.02
7.2.90.3670.00715.05
7.2.80.4360.01015.07
7.2.70.3480.00015.23
7.2.60.3290.01615.28
7.2.50.0110.01115.29
7.2.40.0480.01115.11
7.2.30.0090.00915.25
7.2.20.0410.00315.10
7.2.10.0590.01115.00
7.2.00.1730.01315.26
7.1.250.0190.01013.97
7.0.330.0100.01013.90
5.6.380.0100.00514.05

preferences:
171.9 ms | 403 KiB | 5 Q