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); $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.0100.00716.75
8.3.50.0100.00917.40
8.3.40.0100.00719.10
8.3.30.0070.00718.82
8.3.20.0080.00018.73
8.3.10.0050.00319.03
8.3.00.0030.00617.75
8.2.180.0110.00416.63
8.2.170.0070.00722.96
8.2.160.0120.00318.94
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00421.23
8.2.110.0090.00019.21
8.2.100.0120.00018.03
8.2.90.0030.00519.20
8.2.80.0060.00319.04
8.2.70.0080.00017.75
8.2.60.0030.00617.75
8.2.50.0060.00317.75
8.2.40.0000.00917.88
8.2.30.0040.00717.78
8.2.20.0050.00517.74
8.2.10.0040.00417.91
8.2.00.0000.00717.81
8.1.280.0090.00625.92
8.1.270.0070.00023.99
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00823.80
8.1.230.0040.00721.03
8.1.220.0000.00818.77
8.1.210.0040.00418.77
8.1.200.0030.00517.60
8.1.190.0080.00017.35
8.1.180.0000.00818.10
8.1.170.0040.00417.62
8.1.160.0060.00318.75
8.1.150.0040.00418.71
8.1.140.0040.00417.48
8.1.130.0070.00017.55
8.1.120.0030.00617.63
8.1.110.0000.00917.54
8.1.100.0080.00017.51
8.1.90.0000.00817.52
8.1.80.0000.00717.52
8.1.70.0030.00317.47
8.1.60.0030.00617.70
8.1.50.0000.00817.62
8.1.40.0060.00317.58
8.1.30.0030.00617.75
8.1.20.0000.00817.86
8.1.10.0030.00517.73
8.1.00.0000.00817.53
8.0.300.0080.00018.77
8.0.290.0000.00816.88
8.0.280.0000.00718.17
8.0.270.0040.00417.21
8.0.260.0070.00017.03
8.0.250.0000.00717.13
8.0.240.0050.00316.99
8.0.230.0000.00716.99
8.0.220.0000.00717.06
8.0.210.0030.00317.06
8.0.200.0000.00617.07
8.0.190.0060.00317.13
8.0.180.0000.00717.11
8.0.170.0060.00317.05
8.0.160.0050.00216.92
8.0.150.0000.00816.91
8.0.140.0050.00316.98
8.0.130.0030.00313.42
8.0.120.0000.00917.06
8.0.110.0040.00417.05
8.0.100.0070.00017.03
8.0.90.0070.00016.84
8.0.80.0080.00816.97
8.0.70.0000.00717.05
8.0.60.0040.00416.99
8.0.50.0040.00417.02
8.0.30.0180.00017.42
8.0.20.0070.02017.35
8.0.10.0070.00017.05
8.0.00.0120.01016.99
7.4.330.0050.00013.20
7.4.320.0040.00416.82
7.4.300.0060.00016.74
7.4.290.0000.00716.63
7.4.280.0000.00716.86
7.4.270.0000.00716.62
7.4.260.0030.00313.53
7.4.250.0040.00416.86
7.4.240.0040.00416.83
7.4.230.0040.00416.84
7.4.220.0100.01716.82
7.4.210.0070.01416.75
7.4.200.0050.00316.82
7.4.190.0090.00016.84
7.4.160.0130.01016.68
7.4.150.0110.01116.74
7.4.140.0060.01617.86
7.4.130.0130.00616.64
7.4.120.0030.01316.56
7.4.110.0180.00616.87
7.4.100.0070.01416.66
7.4.90.0090.00916.61
7.4.80.0070.01019.39
7.4.70.0140.00316.67
7.4.60.0080.00816.83
7.4.50.0000.00616.64
7.4.40.0040.01516.67
7.4.30.0070.01016.54
7.4.00.0090.00315.27
7.3.330.0030.00313.32
7.3.320.0030.00613.35
7.3.310.0030.00316.47
7.3.300.0000.00916.48
7.3.290.0070.00916.46
7.3.280.0190.00016.45
7.3.270.0060.01316.67
7.3.260.0090.00916.49
7.3.240.0110.01116.53
7.3.230.0100.00616.49
7.3.210.0110.00716.70
7.3.200.0130.00716.48
7.3.190.0130.00316.65
7.3.180.0030.01316.38
7.3.170.0090.00616.76
7.3.160.0040.01116.71
7.3.120.0090.00915.02
7.2.330.0090.00916.87
7.2.320.0090.00716.95
7.2.310.0040.01316.70
7.2.300.0070.01016.88
7.2.290.0110.00816.89
7.2.60.0100.00617.10
7.2.00.0100.00319.64
7.1.200.0130.00915.86
7.1.100.0090.00618.29
7.1.70.0030.00617.40
7.1.60.0060.01919.25
7.1.50.0060.01517.16
7.1.00.0030.03722.39
7.0.200.0050.00216.66
7.0.140.0000.07722.16
7.0.120.0000.07722.04
7.0.110.0200.08019.92
7.0.100.0100.07020.02
7.0.90.0100.08319.95
7.0.80.0130.07719.84
7.0.70.0030.08319.84
7.0.60.0030.08319.95
7.0.50.0030.08720.09
7.0.40.0130.07719.69
7.0.30.0030.08719.75
7.0.20.0100.08719.77
7.0.10.0030.08319.82
7.0.00.0270.06319.80
5.6.280.0030.07321.12
5.6.260.0030.08320.59
5.6.250.0100.08020.63
5.6.240.0070.08020.69
5.6.230.0200.08020.47
5.6.220.0100.08720.67
5.6.210.0100.08320.63
5.6.200.0100.08720.64
5.6.190.0100.05020.58
5.6.180.0100.08020.64
5.6.170.0070.07720.46
5.6.160.0130.07720.57
5.6.150.0100.07320.59
5.6.140.0100.08020.57
5.6.130.0030.09020.65
5.6.120.0130.07020.61
5.6.110.0100.04320.54
5.6.100.0030.08320.45
5.6.90.0100.08320.56
5.6.80.0070.07319.84
5.6.70.0030.08719.93
5.6.60.0100.07719.99
5.6.50.0170.06720.06
5.6.40.0130.07719.83
5.6.30.0030.08319.91
5.6.20.0100.07019.91
5.6.10.0070.07720.06
5.6.00.0100.07320.00
5.5.380.0170.06017.40
5.5.370.0030.05717.63
5.5.360.0000.09317.61
5.5.350.0130.07317.52
5.5.340.0030.08317.77
5.5.330.0070.07717.87
5.5.320.0170.08317.98
5.5.310.0100.05318.13
5.5.300.0070.07718.09
5.5.290.0030.08717.86
5.5.280.0070.08317.77
5.5.270.0130.06718.14
5.5.260.0130.07718.10
5.5.250.0100.07717.97
5.5.240.0170.06717.54
5.5.230.0030.08017.22
5.5.220.0100.07017.59
5.5.210.0130.07017.14
5.5.200.0030.08717.22
5.5.190.0070.05317.47
5.5.180.0200.07017.48
5.5.160.0070.07717.20
5.5.150.0070.07317.24
5.5.140.0100.07317.35
5.5.130.0070.05317.50
5.5.120.0130.07017.52
5.5.110.0100.07317.37
5.5.100.0100.06717.10
5.5.90.0070.07717.35
5.5.80.0130.05317.41
5.5.70.0100.07017.34
5.5.60.0000.04717.27
5.5.50.0070.08017.41
5.5.40.0030.05717.49
5.5.30.0170.03017.22
5.5.20.0200.03317.09
5.5.10.0030.03717.49
5.5.00.0000.07317.33
5.4.450.0100.08019.36
5.4.440.0100.08019.32
5.4.430.0130.07019.44
5.4.420.0170.07019.30
5.4.410.0000.08019.24
5.4.400.0170.06019.13
5.4.390.0130.05319.13
5.4.380.0030.08018.95
5.4.370.0100.07018.98
5.4.360.0070.07719.03
5.4.350.0030.05019.04
5.4.340.0070.07718.96
5.4.320.0070.07719.17
5.4.310.0100.07319.12
5.4.300.0030.08019.16
5.4.290.0170.06318.92
5.4.280.0170.06319.12
5.4.270.0030.08018.93
5.4.260.0070.07319.16
5.4.250.0030.04018.92
5.4.240.0130.06719.13
5.4.230.0030.04319.11
5.4.220.0170.04318.97
5.4.210.0100.07019.00
5.4.200.0070.04019.13
5.4.190.0100.07018.99
5.4.180.0000.07019.00
5.4.170.0100.07019.16
5.4.160.0100.04319.09
5.4.150.0100.06318.92
5.4.140.0070.07716.28
5.4.130.0130.07016.24
5.4.120.0100.07016.30
5.4.110.0030.07316.18
5.4.100.0130.07016.54
5.4.90.0100.07016.53
5.4.80.0030.07316.53
5.4.70.0070.06316.56
5.4.60.0100.07016.45
5.4.50.0000.07316.48
5.4.40.0030.07716.52
5.4.30.0100.06716.48
5.4.20.0000.07716.25
5.4.10.0070.07316.34
5.4.00.0030.05315.65
5.3.290.0070.08314.59
5.3.280.0230.06014.61
5.3.270.0070.07714.55
5.3.260.0100.06714.46
5.3.250.0000.04014.52
5.3.240.0030.03714.55
5.3.230.0000.08314.43
5.3.220.0030.07714.58
5.3.210.0100.08714.58
5.3.200.0100.07314.37
5.3.190.0070.07014.46
5.3.180.0070.04714.36
5.3.170.0130.07014.64
5.3.160.0030.07014.66
5.3.150.0030.04014.59
5.3.140.0100.06014.50
5.3.130.0130.07014.39
5.3.120.0070.07714.50
5.3.110.0100.07314.41
5.3.100.0100.04713.89
5.3.90.0070.07313.89
5.3.80.0100.07013.95
5.3.70.0130.06713.95
5.3.60.0230.06014.07
5.3.50.0030.07713.82
5.3.40.0100.07313.79
5.3.30.0070.07013.83
5.3.20.0130.04313.71
5.3.10.0100.06013.56
5.3.00.0070.06313.54
5.2.170.0100.06011.15
5.2.160.0030.06011.07
5.2.150.0030.06011.16
5.2.140.0170.05311.07
5.2.130.0030.06011.02
5.2.120.0070.05711.00
5.2.110.0030.07010.89
5.2.100.0030.04311.27
5.2.90.0100.04310.89
5.2.80.0070.03311.10
5.2.70.0170.04711.00
5.2.60.0070.05711.07
5.2.50.0030.05010.94
5.2.40.0070.06010.80
5.2.30.0100.05710.98
5.2.20.0100.05711.04
5.2.10.0030.05311.00
5.2.00.0030.06010.73
5.1.60.0000.05310.02
5.1.50.0030.04310.26
5.1.40.0070.05010.06
5.1.30.0070.04010.43
5.1.20.0030.05710.36
5.1.10.0100.05010.11
5.1.00.0070.0509.97
5.0.50.0100.0379.88
5.0.40.0030.0479.88
5.0.30.0000.0409.88
5.0.20.0000.0279.88
5.0.10.0000.0209.88
5.0.00.0000.0339.88
4.4.90.0030.0279.88
4.4.80.0030.0339.88
4.4.70.0070.0309.88
4.4.60.0030.0339.88
4.4.50.0030.0379.88
4.4.40.0100.0339.88
4.4.30.0000.0379.88
4.4.20.0000.0409.88
4.4.10.0030.0339.88
4.4.00.0000.0439.88
4.3.110.0030.0279.88
4.3.100.0000.0179.88
4.3.90.0070.0279.88
4.3.80.0030.0239.88
4.3.70.0000.0139.88
4.3.60.0000.0279.88
4.3.50.0000.0209.88
4.3.40.0000.0239.88
4.3.30.0000.0179.88
4.3.20.0000.0179.88
4.3.10.0000.0139.88
4.3.00.0000.0139.88

preferences:
35.25 ms | 400 KiB | 5 Q