3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "<p>Some string www.test.com with urls http://test.com in it http://www.test.com.</p>"; if(preg_match_all("/((http|https)\:\/\/)?[a-zA-Z0-9\.\/\?\:@\-_=#]+\.([a-zA-Z0-9\&\.\/\?\:@\-_=#])*/",$text,$urls)){ foreach($urls[0]as $url ){ $text = str_replace($url,'<a href="'.$url.'">'.$url.'</a>',$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.60.0160.00320.36
8.3.50.0110.00418.47
8.3.40.0150.00618.76
8.3.30.0130.00318.85
8.3.20.0080.00021.89
8.3.10.0040.00423.70
8.3.00.0030.00522.08
8.2.180.0100.00718.66
8.2.170.0120.00322.96
8.2.160.0110.00419.25
8.2.150.0040.01124.18
8.2.140.0000.00824.66
8.2.130.0040.00418.03
8.2.120.0000.00726.35
8.2.110.0090.00922.20
8.2.100.0040.00717.97
8.2.90.0050.00319.82
8.2.80.0030.00517.97
8.2.70.0090.00017.88
8.2.60.0000.00918.04
8.2.50.0060.00318.07
8.2.40.0040.00418.16
8.2.30.0040.00418.04
8.2.20.0040.00418.14
8.2.10.0000.00720.64
8.2.00.0030.00619.51
8.1.280.0100.01025.92
8.1.270.0080.00018.83
8.1.260.0000.00826.35
8.1.250.0050.00228.09
8.1.240.0040.00722.45
8.1.230.0110.00020.88
8.1.220.0040.00417.74
8.1.210.0030.00619.08
8.1.200.0030.00617.48
8.1.190.0060.00317.35
8.1.180.0060.00318.10
8.1.170.0030.00518.71
8.1.160.0030.00518.81
8.1.150.0000.00718.83
8.1.140.0080.00022.21
8.1.130.0000.00820.09
8.1.120.0000.00717.59
8.1.110.0070.00017.70
8.1.100.0050.00317.57
8.1.90.0040.00417.66
8.1.80.0060.00317.60
8.1.70.0030.00317.51
8.1.60.0060.00317.74
8.1.50.0030.00517.57
8.1.40.0050.00317.61
8.1.30.0040.00417.83
8.1.20.0040.00717.64
8.1.10.0040.00417.68
8.1.00.0040.00417.56
8.0.300.0060.00320.03
8.0.290.0030.00516.75
8.0.280.0000.00718.52
8.0.270.0080.00017.29
8.0.260.0000.00618.48
8.0.250.0040.00417.16
8.0.240.0060.00017.09
8.0.230.0070.00017.02
8.0.220.0000.00816.98
8.0.210.0070.00017.07
8.0.200.0030.00317.14
8.0.190.0040.00417.09
8.0.180.0040.00417.08
8.0.170.0000.00816.96
8.0.160.0040.00416.98
8.0.150.0000.00716.87
8.0.140.0020.00516.89
8.0.130.0000.00613.52
8.0.120.0000.00716.91
8.0.110.0040.00416.99
8.0.100.0050.00316.98
8.0.90.0020.00517.09
8.0.80.0060.01317.03
8.0.70.0000.00917.01
8.0.60.0000.00717.09
8.0.50.0070.00016.88
8.0.30.0120.00917.42
8.0.20.0030.01817.41
8.0.10.0070.00017.05
8.0.00.0130.00816.73
7.4.330.0030.00315.55
7.4.320.0030.00316.76
7.4.300.0040.00416.75
7.4.290.0030.00316.73
7.4.280.0030.00616.86
7.4.270.0000.00716.84
7.4.260.0080.00016.69
7.4.250.0000.00716.79
7.4.240.0040.00416.68
7.4.230.0070.00016.89
7.4.220.0030.00516.65
7.4.210.0030.01216.79
7.4.200.0050.00316.52
7.4.160.0090.00816.67
7.4.140.0080.01017.86
7.4.130.0190.00616.57
7.4.120.0130.01316.75
7.4.110.0070.01616.63
7.4.100.0190.00016.73
7.4.90.0060.01116.69
7.4.80.0110.01119.39
7.4.70.0130.01316.68
7.4.60.0040.01316.84
7.4.50.0060.00916.54
7.4.40.0080.00816.59
7.4.00.0080.00614.96
7.3.330.0030.00313.31
7.3.320.0050.00013.38
7.3.310.0050.00316.63
7.3.300.0040.00416.49
7.3.290.0080.00016.38
7.3.280.0030.01416.43
7.3.260.0100.01016.58
7.3.240.0100.01016.66
7.3.230.0130.00616.71
7.3.210.0120.00916.63
7.3.200.0120.00316.46
7.3.190.0120.00916.76
7.3.180.0070.01116.51
7.3.170.0120.00616.44
7.3.160.0110.00616.67
7.3.120.0070.01014.95
7.3.110.0060.00914.92
7.3.100.0000.00914.98
7.3.90.0130.00315.06
7.3.80.0030.01315.14
7.3.70.0070.01014.65
7.3.60.0070.00714.82
7.3.50.0030.01014.81
7.3.40.0030.01014.85
7.3.30.0030.01214.77
7.3.20.0060.01016.90
7.3.10.0060.00916.50
7.3.00.0540.00615.42
7.2.330.0130.00316.90
7.2.320.0080.00916.87
7.2.310.0060.01116.98
7.2.300.0000.01716.98
7.2.290.0070.01316.83
7.2.250.0100.01015.28
7.2.240.0170.00015.41
7.2.230.0090.00615.04
7.2.220.0100.00715.08
7.2.210.0000.01315.12
7.2.200.0150.00314.98
7.2.190.0040.01215.20
7.2.180.0060.00615.36
7.2.170.0060.00615.31
7.2.130.0680.01014.97
7.2.120.0600.01014.98
7.2.110.0510.00515.14
7.2.100.1160.01015.12
7.2.90.0640.00715.02
7.2.80.0580.01015.04
7.2.70.0530.00715.27
7.2.60.0790.00715.31
7.2.50.0760.00715.33
7.2.40.0770.00715.26
7.2.30.0540.00715.24
7.2.20.0570.00615.32
7.2.10.0710.00715.37
7.2.00.0700.00715.20
7.1.330.0070.00715.79
7.1.320.0030.01015.86
7.1.310.0080.00616.02
7.1.300.0100.00315.68
7.1.290.0040.01115.95
7.1.280.0000.01615.72
7.1.270.0040.01415.74
7.1.260.0030.01316.11
7.1.250.0630.00514.20
7.0.330.0810.01013.76
5.6.380.0090.00814.69

preferences:
62.15 ms | 400 KiB | 5 Q