3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "demo link edno www.abv.bg link 2 http://abv123.bg/"; $reg_exUrl = "/(http|https|ftp|ftps)\:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/"; preg_match_all($reg_exUrl, $text, $matches); $usedPatterns = array(); foreach($matches[0] as $pattern){ if(!array_key_exists($pattern, $usedPatterns)){ $usedPatterns[$pattern]=true; $text = str_replace ($pattern, "<a href='{$pattern}' target='_blank'>{$pattern}</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.70.0040.01116.75
8.3.60.0100.00718.55
8.3.50.0100.01021.20
8.3.40.0100.00719.14
8.3.30.0130.00020.34
8.3.20.0040.00420.13
8.3.10.0000.00821.09
8.3.00.0050.00322.39
8.2.180.0130.00318.66
8.2.170.0080.00822.96
8.2.160.0040.01122.42
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0100.00726.16
8.2.120.0050.00320.87
8.2.110.0030.00619.21
8.2.100.0030.01018.03
8.2.90.0080.00019.17
8.2.80.0040.00417.97
8.2.70.0050.00317.75
8.2.60.0040.00418.05
8.2.50.0030.00618.07
8.2.40.0050.00318.15
8.2.30.0040.00419.47
8.2.20.0030.00617.73
8.2.10.0040.00418.02
8.2.00.0000.00817.77
8.1.280.0070.01325.92
8.1.270.0020.00523.99
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0060.00323.92
8.1.230.0090.00320.96
8.1.220.0000.00818.77
8.1.210.0000.00920.84
8.1.200.0090.00017.47
8.1.190.0060.00317.63
8.1.180.0000.01018.10
8.1.170.0060.00318.42
8.1.160.0040.00418.90
8.1.150.0050.00318.79
8.1.140.0050.00517.60
8.1.130.0030.00317.76
8.1.120.0070.00017.53
8.1.110.0060.00317.48
8.1.100.0070.00017.63
8.1.90.0000.00717.48
8.1.80.0020.00517.49
8.1.70.0000.00717.53
8.1.60.0080.00017.75
8.1.50.0040.00417.72
8.1.40.0050.00317.73
8.1.30.0030.00617.79
8.1.20.0040.00417.80
8.1.10.0050.00217.70
8.1.00.0000.01017.68
8.0.300.0000.00719.90
8.0.290.0080.00017.28
8.0.280.0070.00018.43
8.0.270.0000.00717.19
8.0.260.0040.00416.99
8.0.250.0000.00717.09
8.0.240.0100.00017.02
8.0.230.0030.00717.10
8.0.220.0000.00717.01
8.0.210.0040.00417.02
8.0.200.0000.00717.12
8.0.190.0000.00817.07
8.0.180.0020.00517.00
8.0.170.0070.00017.01
8.0.160.0030.00316.94
8.0.150.0000.00716.97
8.0.140.0030.00716.93
8.0.130.0060.00013.42
8.0.120.0000.00717.04
8.0.110.0080.00016.91
8.0.100.0000.00817.11
8.0.90.0040.00416.88
8.0.80.0120.00317.00
8.0.70.0050.00317.08
8.0.60.0070.00017.05
8.0.50.0000.00717.02
8.0.30.0100.00917.14
8.0.20.0100.00917.53
8.0.10.0030.00517.00
8.0.00.0080.01016.97
7.4.330.0000.00516.83
7.4.320.0000.00716.84
7.4.300.0070.00016.81
7.4.290.0000.00716.76
7.4.280.0050.00316.74
7.4.270.0000.00716.83
7.4.260.0050.00013.50
7.4.250.0040.00416.78
7.4.240.0040.00416.72
7.4.230.0020.00516.63
7.4.220.0090.00916.82
7.4.210.0070.00816.78
7.4.200.0000.00716.90
7.4.190.0030.00316.58
7.4.160.0140.00316.77
7.4.150.0030.01417.40
7.4.140.0070.01017.86
7.4.130.0110.00816.77
7.4.120.0100.00716.80
7.4.110.0140.00416.69
7.4.100.0070.01016.65
7.4.90.0070.01116.78
7.4.80.0040.01419.39
7.4.70.0080.01316.86
7.4.60.0090.01516.76
7.4.50.0000.00916.71
7.4.40.0000.01122.77
7.4.30.0130.00316.70
7.4.10.0100.01015.14
7.4.00.0100.00715.28
7.3.330.0020.00213.39
7.3.320.0000.00513.31
7.3.310.0000.00716.42
7.3.300.0000.00716.54
7.3.290.0070.00716.44
7.3.280.0100.00716.49
7.3.270.0090.00917.40
7.3.260.0100.01018.24
7.3.250.0070.01016.58
7.3.240.0130.00316.73
7.3.230.0140.00316.64
7.3.210.0030.01316.69
7.3.200.0140.00419.39
7.3.190.0130.00916.81
7.3.180.0130.01016.77
7.3.170.0090.00816.75
7.3.160.0140.00616.44
7.3.130.0080.01114.94
7.3.120.0080.00914.89
7.3.110.0050.00914.91
7.3.100.0070.00914.68
7.3.90.0070.00715.20
7.3.80.0100.01015.25
7.3.70.0030.01015.03
7.3.60.0030.01014.97
7.3.50.0080.00614.99
7.3.40.0110.00314.96
7.3.30.0070.00614.96
7.3.20.0050.01116.94
7.3.10.0040.01216.67
7.3.00.0070.00716.88
7.2.330.0040.01316.93
7.2.320.0170.00716.88
7.2.310.0080.01216.81
7.2.300.0150.00816.78
7.2.290.0060.01116.88
7.2.260.0050.00815.47
7.2.250.0060.00815.24
7.2.240.0030.01215.45
7.2.230.0060.01315.35
7.2.220.0060.00715.16
7.2.210.0090.00515.02
7.2.200.0100.00615.27
7.2.190.0020.01015.08
7.2.180.0050.00915.08
7.2.170.0030.01215.19
7.2.160.0050.00915.31
7.2.150.0040.01216.99
7.2.140.0090.00617.08
7.2.130.0070.00616.98
7.2.120.0030.01117.13
7.2.110.0080.00917.00
7.2.100.0060.00917.16
7.2.90.0070.01017.05
7.2.80.0030.01317.06
7.2.70.0030.01117.10
7.2.60.0060.00817.14
7.2.50.0080.01017.07
7.2.40.0040.00617.09
7.2.30.0040.00917.09
7.2.20.0040.01017.07
7.2.10.0060.01017.16
7.2.00.0070.00917.89
7.1.330.0060.00615.92
7.1.320.0100.00515.97
7.1.310.0100.00516.04
7.1.300.0080.00915.90
7.1.290.0070.00516.02
7.1.280.0020.01115.95
7.1.270.0050.00815.84
7.1.260.0070.00515.91
7.1.250.0020.01015.90
7.1.240.0000.01415.91
7.1.230.0040.01216.10
7.1.220.0040.01215.99
7.1.210.0000.01215.86
7.1.200.0030.01116.12
7.1.190.0030.01316.07
7.1.180.0060.01116.13
7.1.170.0070.00716.01
7.1.160.0070.00715.97
7.1.150.0030.01216.07
7.1.140.0070.01016.00
7.1.130.0110.00715.86
7.1.120.0080.00015.91
7.1.110.0030.00915.95
7.1.100.0050.00917.12
7.1.90.0030.00815.86
7.1.80.0000.01716.20
7.1.70.0050.00516.54
7.1.60.0130.00617.48
7.1.50.0080.01016.64
7.1.40.0070.00715.98
7.1.30.0040.01115.96
7.1.20.0000.01515.72
7.1.10.0030.01015.94
7.1.00.0090.03419.23
7.0.330.0030.01015.68
7.0.320.0060.00615.55
7.0.310.0070.00715.47
7.0.300.0090.00615.59
7.0.290.0030.01215.62
7.0.280.0060.00915.35
7.0.270.0060.00615.69
7.0.260.0120.00315.61
7.0.250.0030.01215.65
7.0.240.0100.00615.48
7.0.230.0080.00415.40
7.0.220.0060.00615.58
7.0.210.0080.00815.50
7.0.200.0050.00516.35
7.0.190.0060.00315.54
7.0.180.0110.00015.61
7.0.170.0060.00615.73
7.0.160.0030.01015.68
7.0.150.0090.00315.55
7.0.140.0100.03518.90
7.0.130.0060.00615.72
7.0.120.0120.00315.56
7.0.110.0110.00015.49
7.0.100.0030.02217.70
7.0.90.0060.02417.73
7.0.80.0030.02617.63
7.0.70.0070.02517.59
7.0.60.0030.02717.88
7.0.50.0100.02018.11
7.0.40.0040.02216.71
7.0.30.0060.02516.91
7.0.20.0080.02216.91
7.0.10.0050.02516.85
7.0.00.0070.02116.82
5.6.400.0130.00314.48
5.6.390.0030.01514.58
5.6.380.0040.01114.85
5.6.370.0030.00614.10
5.6.360.0080.00314.93
5.6.350.0030.01314.48
5.6.340.0000.01214.50
5.6.330.0060.01214.48
5.6.320.0030.01314.29
5.6.310.0060.00914.60
5.6.300.0030.01014.57
5.6.290.0070.00714.73
5.6.280.0090.03817.86
5.6.270.0110.00514.41
5.6.260.0030.00614.80
5.6.250.0100.02017.58
5.6.240.0090.02017.57
5.6.230.0030.02817.53
5.6.220.0020.02517.58
5.6.210.0050.02517.52
5.6.200.0090.02017.79
5.6.190.0050.02417.82
5.6.180.0120.02317.83
5.6.170.0070.02317.88
5.6.160.0030.02617.64
5.6.150.0090.02017.71
5.6.140.0030.02317.68
5.6.130.0080.02317.70
5.6.120.0050.03617.72
5.6.110.0100.02517.66
5.6.100.0100.03817.84
5.6.90.0100.04317.73
5.6.80.0060.04517.56
5.6.70.0020.03917.52
5.6.60.0110.03317.41
5.6.50.0100.04417.40
5.6.40.0030.04217.32
5.6.30.0100.03217.33
5.6.20.0070.02417.38
5.6.10.0040.04417.50
5.6.00.0070.02317.40
5.5.380.0050.02317.30
5.5.370.0060.02317.55
5.5.360.0050.02317.46
5.5.350.0030.02517.39
5.5.340.0060.02917.65
5.5.330.0030.02317.43
5.5.320.0050.02017.55
5.5.310.0030.02117.73
5.5.300.0080.02317.51
5.5.290.0050.02417.48
5.5.280.0070.02517.63
5.5.270.0020.02917.66
5.5.260.0000.02817.75
5.5.250.0020.04717.56
5.5.240.0060.02517.32
5.5.230.0130.03817.21
5.5.220.0000.04617.25
5.5.210.0100.04517.27
5.5.200.0030.04417.30
5.5.190.0080.03617.08
5.5.180.0120.03217.39
5.5.170.0040.00814.52
5.5.160.0050.04317.30
5.5.150.0120.02817.20
5.5.140.0120.03417.36
5.5.130.0070.03617.25
5.5.120.0080.04217.26
5.5.110.0050.03717.21
5.5.100.0060.04717.23
5.5.90.0030.04517.20
5.5.80.0120.02017.16
5.5.70.0140.02117.14
5.5.60.0080.03317.09
5.5.50.0090.02317.26
5.5.40.0090.03317.21
5.5.30.0100.04217.28
5.5.20.0060.04117.24
5.5.10.0120.03617.15
5.5.00.0170.03017.17
5.4.450.0040.02715.92
5.4.440.0060.02415.88
5.4.430.0070.01715.83
5.4.420.0040.02115.85
5.4.410.0070.04215.90
5.4.400.0050.04215.80
5.4.390.0030.04015.75
5.4.380.0020.04115.80
5.4.370.0060.04215.80
5.4.360.0070.03415.75
5.4.350.0120.03015.77
5.4.340.0080.03015.78
5.4.330.0030.00612.46
5.4.320.0070.04215.74
5.4.310.0060.03815.76
5.4.300.0080.03415.77
5.4.290.0060.04115.63
5.4.280.0080.03815.80
5.4.270.0020.03215.62
5.4.260.0040.03515.75
5.4.250.0070.03215.70
5.4.240.0080.02715.63
5.4.230.0020.04215.70
5.4.220.0100.03115.64
5.4.210.0020.02715.78
5.4.200.0030.03815.84
5.4.190.0120.03515.75
5.4.180.0030.03615.62
5.4.170.0060.04115.74
5.4.160.0080.03415.76
5.4.150.0020.02515.74
5.4.140.0050.02514.39
5.4.130.0080.03514.41
5.4.120.0080.02214.39
5.4.110.0080.02214.41
5.4.100.0080.03814.40
5.4.90.0020.02614.44
5.4.80.0050.03714.38
5.4.70.0080.03214.33
5.4.60.0030.03914.45
5.4.50.0080.03014.38
5.4.40.0070.03714.42
5.4.30.0110.01914.37
5.4.20.0100.02714.32
5.4.10.0100.02514.38
5.4.00.0040.02414.06
5.3.290.0080.03513.52
5.3.280.0030.03513.53
5.3.270.0020.04413.53
5.3.260.0070.03113.53
5.3.250.0060.02013.52
5.3.240.0050.03213.47
5.3.230.0020.02613.53
5.3.220.0070.02713.51
5.3.210.0050.02713.52
5.3.200.0050.03513.50
5.3.190.0030.03813.49
5.3.180.0080.03313.48
5.3.170.0100.03213.49
5.3.160.0030.04313.48
5.3.150.0020.02313.52
5.3.140.0030.04213.49
5.3.130.0020.04313.50
5.3.120.0100.02313.48
5.3.110.0070.03813.47
5.3.100.0070.03713.19
5.3.90.0050.03813.17
5.3.80.0070.02413.24
5.3.70.0030.03513.22
5.3.60.0040.02713.21
5.3.50.0020.02513.19
5.3.40.0050.02613.20
5.3.30.0070.02713.12
5.3.20.0070.02313.06
5.3.10.0090.03513.06
5.3.00.0050.01913.06
5.2.170.0070.02713.66
5.2.160.0130.04713.66
5.2.150.0070.05313.66
5.2.140.0070.05313.66
5.2.130.0070.02713.66
5.2.120.0030.06013.66
5.2.110.0030.03313.66
5.2.100.0070.05013.66
5.2.90.0070.05713.66
5.2.80.0030.06713.66
5.2.70.0030.05313.66
5.2.60.0070.03313.66
5.2.50.0070.04313.66
5.2.40.0100.04713.66
5.2.30.0070.05313.66
5.2.20.0070.05013.66
5.2.10.0100.06013.66
5.2.00.0100.05313.66
5.1.60.0030.05313.66
5.1.50.0070.03713.66
5.1.40.0030.02713.66
5.1.30.0070.02713.66
5.1.20.0070.04013.66
5.1.10.0000.02713.66
5.1.00.0030.03313.66
5.0.50.0000.02713.66
5.0.40.0030.02713.66
5.0.30.0030.03713.66
5.0.20.0000.03713.66
5.0.10.0030.02313.66
5.0.00.0000.03713.66
4.4.90.0070.03013.66
4.4.80.0030.03313.66
4.4.70.0030.03713.66
4.4.60.0030.03013.66
4.4.50.0030.02313.66
4.4.40.0030.04713.66
4.4.30.0000.02013.66
4.4.20.0000.02013.66
4.4.10.0000.01713.66
4.4.00.0000.03013.66
4.3.110.0030.02713.66
4.3.100.0030.01313.66
4.3.90.0030.01713.66
4.3.80.0070.02313.66
4.3.70.0000.01713.66
4.3.60.0000.01713.66
4.3.50.0000.01713.66
4.3.40.0030.02313.66
4.3.30.0030.01313.66
4.3.20.0000.02013.66
4.3.10.0030.02313.66
4.3.00.0000.02013.66

preferences:
46.9 ms | 401 KiB | 5 Q