3v4l.org

run code in 300+ PHP versions simultaneously
<?php $reg_exUrl = "/((http|https)\:\/\/|(www)\.)[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(\/\S*)?/"; $text = 'some text http://google.bg/'; preg_match_all($reg_exUrl, $text, $matches); $usedPatterns = array(); foreach($matches[0] as $pattern){ if(!array_key_exists($pattern, $usedPatterns)) { $usedPatterns[$pattern]=true; if(preg_match('%https://%',$pattern)) { $patttern = str_replace('https://', '', $pattern); $start = "https://"; } elseif(preg_match('%http://%',$pattern)) { $pattern = str_replace('http://', '', $pattern); echo $pattern.'<br />'; $start = "http://"; } else { $start = "http://"; } $text = str_replace ($pattern, "<a href='{$start}{$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.60.0120.00316.62
8.3.50.0070.01216.81
8.3.40.0150.00018.79
8.3.30.0110.00418.84
8.3.20.0060.00319.02
8.3.10.0080.00019.02
8.3.00.0080.00317.88
8.2.180.0220.00025.92
8.2.170.0100.01019.04
8.2.160.0100.00322.96
8.2.150.0080.00824.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0000.00720.96
8.2.110.0050.00519.28
8.2.100.0070.00717.88
8.2.90.0090.00017.75
8.2.80.0030.00519.03
8.2.70.0060.00317.88
8.2.60.0040.00418.05
8.2.50.0070.00418.07
8.2.40.0000.00919.72
8.2.30.0000.00917.93
8.2.20.0060.00317.82
8.2.10.0030.00517.88
8.2.00.0030.00517.91
8.1.270.0050.00223.99
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0060.00319.33
8.1.230.0080.00317.77
8.1.220.0050.00317.74
8.1.210.0030.00618.77
8.1.200.0030.00617.48
8.1.190.0030.00517.35
8.1.180.0060.00318.10
8.1.170.0040.00418.78
8.1.160.0040.00419.04
8.1.150.0080.00018.63
8.1.140.0050.00217.64
8.1.130.0040.00417.61
8.1.120.0030.00517.59
8.1.110.0000.00817.65
8.1.100.0000.00717.55
8.1.90.0000.00817.61
8.1.80.0070.00017.62
8.1.70.0000.00817.55
8.1.60.0080.00017.77
8.1.50.0040.00417.66
8.1.40.0000.00817.66
8.1.30.0030.00617.79
8.1.20.0040.00417.66
8.1.10.0040.00417.64
8.1.00.0050.00317.68
8.0.300.0070.00018.77
8.0.290.0080.00016.75
8.0.280.0030.00318.66
8.0.270.0080.00017.36
8.0.260.0070.00016.97
8.0.250.0030.00517.12
8.0.240.0000.00717.14
8.0.230.0040.00417.10
8.0.220.0030.00417.05
8.0.210.0000.00817.07
8.0.200.0030.00317.01
8.0.190.0000.00917.14
8.0.180.0000.00817.05
8.0.170.0000.01017.02
8.0.160.0040.00417.04
8.0.150.0030.00616.89
8.0.140.0030.00616.96
8.0.130.0000.00613.51
8.0.120.0060.00316.89
8.0.110.0050.00317.03
8.0.100.0000.00817.10
8.0.90.0030.00516.89
8.0.80.0070.01117.00
8.0.70.0040.00416.93
8.0.60.0080.00017.07
8.0.50.0050.00317.13
8.0.30.0100.00717.10
8.0.20.0120.01017.44
8.0.10.0000.00717.11
8.0.00.0090.01116.92
7.4.330.0050.00013.17
7.4.320.0000.00716.87
7.4.300.0040.00416.75
7.4.290.0030.00316.80
7.4.280.0090.00016.75
7.4.270.0000.00716.83
7.4.260.0000.00513.48
7.4.250.0040.00416.61
7.4.240.0030.00316.74
7.4.230.0070.00016.52
7.4.220.0180.00016.61
7.4.210.0060.01616.82
7.4.200.0000.00716.48
7.4.190.0000.00916.89
7.4.160.0070.01016.79
7.4.150.0120.00616.84
7.4.140.0070.01117.86
7.4.130.0090.01516.62
7.4.120.0090.00916.78
7.4.110.0190.00016.79
7.4.100.0120.00916.58
7.4.90.0150.00316.68
7.4.80.0070.01019.39
7.4.70.0090.00916.74
7.4.60.0130.00316.80
7.4.50.0000.00516.70
7.4.40.0000.01516.71
7.4.30.0080.01116.73
7.4.00.0030.01015.09
7.3.330.0050.00213.22
7.3.320.0000.00513.43
7.3.310.0000.00716.44
7.3.300.0070.00016.48
7.3.290.0100.00716.54
7.3.280.0130.00816.37
7.3.270.0170.00616.75
7.3.260.0160.00316.70
7.3.240.0150.00916.86
7.3.230.0090.00616.59
7.3.210.0140.00316.51
7.3.200.0130.00516.44
7.3.190.0080.00816.87
7.3.180.0120.00416.50
7.3.170.0090.00716.75
7.3.160.0050.01116.59
7.3.120.0090.00315.29
7.2.330.0140.00316.99
7.2.320.0170.00716.63
7.2.310.0070.01516.89
7.2.300.0050.01116.85
7.2.290.0100.00616.73
7.2.60.0100.00317.08
7.2.00.0040.00719.80
7.1.200.0060.00915.95
7.1.100.0040.00418.43
7.1.70.0000.00917.15
7.1.60.0120.01219.25
7.1.50.0030.00716.99
7.1.00.0000.04722.46
7.0.200.0030.00717.08
7.0.140.0030.06322.15
7.0.120.0000.07322.09
7.0.60.0070.08020.04
7.0.50.0100.08717.94
7.0.40.0030.08017.79
7.0.30.0130.06317.81
7.0.20.0030.07017.81
7.0.10.0100.04017.73
7.0.00.0130.05717.75
5.6.280.0000.07721.09
5.6.210.0100.08020.61
5.6.200.0030.04318.17
5.6.190.0130.07318.16
5.6.180.0070.05018.14
5.6.170.0070.07018.21
5.6.160.0070.07018.20
5.6.150.0070.07018.12
5.6.140.0070.05718.21
5.6.130.0030.04718.12
5.6.120.0070.07718.20
5.6.110.0070.08318.16
5.6.100.0000.07718.20
5.6.90.0100.07018.11
5.6.80.0070.07317.56
5.6.70.0170.06717.45
5.6.60.0070.07017.59
5.6.50.0030.07717.47
5.6.40.0030.07717.48
5.6.30.0070.07317.59
5.6.20.0030.04017.57
5.6.10.0070.04317.56
5.6.00.0100.07317.57
5.5.350.0200.05020.41
5.5.340.0030.08317.98
5.5.330.0100.08017.95
5.5.320.0070.08017.91
5.5.310.0070.03718.00
5.5.300.0030.08017.96
5.5.290.0030.04318.02
5.5.280.0100.07717.89
5.5.270.0070.08017.95
5.5.260.0030.08017.90
5.5.250.0000.05017.82
5.5.240.0100.07717.30
5.5.230.0070.06017.34
5.5.220.0130.07017.25
5.5.210.0070.07317.36
5.5.200.0170.06317.33
5.5.190.0130.07017.24
5.5.180.0100.07717.23
5.5.160.0030.05017.34
5.5.150.0030.07317.37
5.5.140.0070.04717.36
5.5.130.0070.05717.27
5.5.120.0130.06017.36
5.5.110.0070.07017.22
5.5.100.0070.03717.14
5.5.90.0030.07317.20
5.5.80.0070.04017.13
5.5.70.0030.08317.16
5.5.60.0070.07717.26
5.5.50.0030.07017.12
5.5.40.0100.03717.12
5.5.30.0070.03317.22
5.5.20.0000.04317.26
5.5.10.0100.07717.16
5.5.00.0000.05017.12
5.4.450.0000.04719.36
5.4.440.0070.07319.42
5.4.430.0070.04319.27
5.4.420.0100.07319.33
5.4.410.0130.05319.41
5.4.400.0030.06319.09
5.4.390.0070.08319.02
5.4.380.0030.08319.16
5.4.370.0030.05318.82
5.4.360.0100.07018.95
5.4.350.0070.07019.03
5.4.340.0100.04319.14
5.4.320.0070.03718.82
5.4.310.0070.03718.82
5.4.300.0070.03719.03
5.4.290.0100.07718.98
5.4.280.0070.05318.95
5.4.270.0030.07718.98
5.4.260.0100.06318.99
5.4.250.0030.03719.00
5.4.240.0100.06019.11
5.4.230.0070.07319.08
5.4.220.0000.08319.07
5.4.210.0070.04018.98
5.4.200.0100.03719.11
5.4.190.0000.04318.98
5.4.180.0070.05318.98
5.4.170.0100.04319.00
5.4.160.0130.03719.07
5.4.150.0170.07019.00
5.4.140.0100.06316.31
5.4.130.0100.03316.35
5.4.120.0030.07016.38
5.4.110.0030.04716.31
5.4.100.0070.07316.25
5.4.90.0030.05016.41
5.4.80.0030.03316.27
5.4.70.0100.03016.29
5.4.60.0030.03716.23
5.4.50.0030.03316.55
5.4.40.0030.03316.29
5.4.30.0000.04016.25
5.4.20.0000.03716.33
5.4.10.0000.03716.23
5.4.00.0030.03315.62
5.3.290.0000.04314.66
5.3.280.0030.04714.52
5.3.270.0070.06014.60
5.3.260.0000.07014.47
5.3.250.0000.04314.55
5.3.240.0030.05314.57
5.3.230.0070.05314.42
5.3.220.0070.07714.54
5.3.210.0070.08014.49
5.3.200.0170.04714.58
5.3.190.0030.07714.54
5.3.180.0030.07314.64
5.3.170.0070.03714.54
5.3.160.0030.04014.54
5.3.150.0100.04014.51
5.3.140.0000.04014.50
5.3.130.0070.03714.38
5.3.120.0100.03014.53
5.3.110.0030.03714.52
5.3.100.0030.03713.86
5.3.90.0000.03713.99
5.3.80.0030.03313.98
5.3.70.0070.03013.98
5.3.60.0030.03313.75
5.3.50.0070.03313.70
5.3.40.0000.03713.93
5.3.30.0030.04013.88
5.3.20.0000.04013.69
5.3.10.0030.03313.61
5.3.00.0030.03313.50
5.2.170.0030.04011.07
5.2.160.0000.03011.11
5.2.150.0030.02711.14
5.2.140.0030.03011.15
5.2.130.0070.02311.13
5.2.120.0070.02311.02
5.2.110.0070.02711.25
5.2.100.0030.03311.00
5.2.90.0000.03011.06
5.2.80.0000.03011.04
5.2.70.0000.03011.10
5.2.60.0000.03011.03
5.2.50.0000.03011.03
5.2.40.0000.03010.98
5.2.30.0000.03710.81
5.2.20.0030.02710.92
5.2.10.0000.03010.82
5.2.00.0000.03010.75
5.1.60.0030.0209.93
5.1.50.0030.02010.01
5.1.40.0030.0209.99
5.1.30.0000.02710.33
5.1.20.0030.02310.25
5.1.10.0000.02710.04
5.1.00.0030.02710.13
5.0.50.0070.0478.54
5.0.40.0030.0178.35
5.0.30.0100.0578.16
5.0.20.0070.0208.25
5.0.10.0030.0408.22
5.0.00.0000.0378.19
4.4.90.0000.0177.79
4.4.80.0030.0107.79
4.4.70.0030.0137.79
4.4.60.0000.0207.79
4.4.50.0000.0137.79
4.4.40.0030.0207.79
4.4.30.0000.0177.79
4.4.20.0030.0137.79
4.4.10.0030.0377.79
4.4.00.0030.0237.79
4.3.110.0030.0337.79
4.3.100.0000.0237.79
4.3.90.0000.0337.79
4.3.80.0070.0477.79
4.3.70.0000.0377.79
4.3.60.0000.0337.79
4.3.50.0030.0337.79
4.3.40.0000.0337.79
4.3.30.0000.0337.79
4.3.20.0000.0407.79
4.3.10.0030.0307.79
4.3.00.0070.0307.79

preferences:
43.2 ms | 400 KiB | 5 Q