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)) { echo $pattern; $usedPatterns[$pattern]=true; if(preg_match('%https://%',$pattern)) { $patttern = str_replace('https://', ''); $start = "https://"; } elseif(preg_match('%http://%',$pattern)) { $pattern = str_replace('http://', ''); $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.0110.00616.75
8.3.50.0240.00316.62
8.3.40.0100.00719.04
8.3.30.0070.00719.05
8.3.20.0090.00019.02
8.3.10.0000.00818.85
8.3.00.0060.00319.63
8.2.180.0120.00316.88
8.2.170.0120.00922.96
8.2.160.0130.00719.07
8.2.150.0090.00024.18
8.2.140.0000.00924.66
8.2.130.0080.00026.16
8.2.120.0080.00021.31
8.2.110.0040.00722.38
8.2.100.0140.00018.09
8.2.90.0060.00319.25
8.2.80.0080.00318.00
8.2.70.0000.00917.88
8.2.60.0000.01017.80
8.2.50.0050.00318.05
8.2.40.0000.00819.60
8.2.30.0060.00317.93
8.2.20.0000.01017.82
8.2.10.0000.00717.95
8.2.00.0040.00717.85
8.1.280.0120.00625.92
8.1.270.0030.00523.99
8.1.260.0050.00326.35
8.1.250.0030.00628.09
8.1.240.0060.00323.83
8.1.230.0080.00817.57
8.1.220.0000.00817.79
8.1.210.0000.00818.77
8.1.200.0040.00417.48
8.1.190.0050.00317.47
8.1.180.0040.00418.10
8.1.170.0080.00017.62
8.1.160.0000.00719.04
8.1.150.0000.00818.67
8.1.140.0040.00417.65
8.1.130.0030.00317.67
8.1.120.0030.00617.66
8.1.110.0000.00717.53
8.1.100.0000.00817.63
8.1.90.0040.00417.51
8.1.80.0030.00617.67
8.1.70.0060.00317.55
8.1.60.0080.00017.74
8.1.50.0080.00017.52
8.1.40.0080.00317.56
8.1.30.0030.00617.80
8.1.20.0030.00517.69
8.1.10.0000.00817.68
8.1.00.0040.00417.69
8.0.300.0040.00418.77
8.0.290.0000.00716.88
8.0.280.0030.00318.48
8.0.270.0030.00317.16
8.0.260.0070.00017.04
8.0.250.0040.00417.20
8.0.240.0000.00717.03
8.0.230.0080.00017.07
8.0.220.0000.00717.09
8.0.210.0040.00417.00
8.0.200.0030.00317.19
8.0.190.0060.00317.04
8.0.180.0070.00017.02
8.0.170.0000.00817.09
8.0.160.0000.00717.01
8.0.150.0030.00517.15
8.0.140.0030.00817.01
8.0.130.0030.00313.51
8.0.120.0030.00517.11
8.0.110.0070.00016.93
8.0.100.0000.00717.08
8.0.90.0000.00716.98
8.0.80.0030.01317.06
8.0.70.0070.00016.89
8.0.60.0040.00417.01
8.0.50.0030.00617.11
8.0.30.0070.01317.16
8.0.20.0140.00717.32
8.0.10.0000.00817.19
8.0.00.0110.01016.87
7.4.330.0030.00313.20
7.4.320.0000.00816.82
7.4.300.0000.00616.58
7.4.290.0040.00416.80
7.4.280.0000.00716.83
7.4.270.0000.00716.82
7.4.260.0030.00313.52
7.4.250.0030.00516.75
7.4.240.0030.00316.72
7.4.230.0080.00016.54
7.4.220.0090.00916.86
7.4.210.0150.00616.93
7.4.200.0030.00516.77
7.4.190.0000.00816.62
7.4.160.0060.01016.68
7.4.150.0170.00016.53
7.4.140.0130.01017.86
7.4.130.0100.01016.78
7.4.120.0000.02016.86
7.4.110.0100.01316.80
7.4.100.0100.00716.75
7.4.90.0070.01016.96
7.4.80.0000.02019.39
7.4.70.0130.01016.80
7.4.60.0070.01016.86
7.4.50.0040.00416.73
7.4.40.0090.00616.63
7.4.30.0030.01316.75
7.4.00.0110.00515.12
7.3.330.0060.00013.45
7.3.320.0060.00013.42
7.3.310.0030.00316.38
7.3.300.0040.00416.40
7.3.290.0080.00916.54
7.3.280.0090.00616.49
7.3.270.0050.01316.66
7.3.260.0120.00616.88
7.3.240.0060.01116.78
7.3.230.0030.01316.77
7.3.210.0150.01516.51
7.3.200.0120.00616.63
7.3.190.0070.01416.51
7.3.180.0060.01416.71
7.3.170.0070.01116.68
7.3.160.0110.00616.55
7.3.120.0080.00614.96
7.3.110.0190.00015.22
7.3.100.0060.00915.01
7.3.90.0060.00315.11
7.3.80.0040.00715.05
7.3.70.0130.00314.93
7.3.60.0090.00614.99
7.3.50.0070.01014.82
7.3.40.0000.01314.97
7.3.30.0070.00714.77
7.3.20.0060.00617.00
7.3.10.0090.00716.75
7.3.00.0040.00816.68
7.2.330.0120.00616.98
7.2.320.0130.00316.95
7.2.310.0070.01016.89
7.2.300.0100.00616.91
7.2.290.0160.00016.94
7.2.250.0130.00715.47
7.2.240.0090.01215.12
7.2.230.0130.00315.29
7.2.220.0030.00915.04
7.2.210.0100.00615.21
7.2.200.0070.00315.20
7.2.190.0040.00715.18
7.2.180.0030.00715.34
7.2.170.0100.00615.48
7.2.130.0170.01017.11
7.2.120.0130.00716.96
7.2.110.0140.00616.65
7.2.100.0160.00417.05
7.2.90.0170.00417.16
7.2.80.0270.00416.66
7.2.70.0180.00016.98
7.2.60.0130.00617.07
7.2.50.0360.00416.88
7.2.40.0240.00917.05
7.2.30.0250.00917.16
7.2.20.0210.00717.15
7.2.10.0300.01117.20
7.2.00.0110.00818.25
7.1.330.0040.01115.80
7.1.320.0060.00615.73
7.1.310.0100.00316.05
7.1.300.0040.01116.11
7.1.290.0000.01415.89
7.1.280.0040.00715.93
7.1.270.0040.00715.71
7.1.260.0090.00416.20
7.1.250.0040.01115.96
7.1.100.0070.01018.26
7.1.70.0000.01617.53
7.1.60.0110.01519.25
7.1.50.0040.00717.23
7.1.00.0070.06722.48
7.0.200.0040.00417.04
7.0.140.0130.06722.21
7.0.120.0100.06722.14
7.0.60.0000.08719.97
7.0.50.0070.03717.88
7.0.40.0030.04317.88
7.0.30.0030.04017.78
7.0.20.0070.03717.82
7.0.10.0030.03717.66
7.0.00.0070.03717.75
5.6.280.0070.07021.12
5.6.210.0030.07320.74
5.6.200.0030.04018.19
5.6.190.0030.04018.18
5.6.180.0000.04318.19
5.6.170.0030.04018.22
5.6.160.0030.04018.16
5.6.150.0030.04018.19
5.6.140.0070.03318.21
5.6.130.0000.04318.11
5.6.120.0000.04718.20
5.6.110.0070.03718.17
5.6.100.0070.03718.20
5.6.90.0000.04318.10
5.6.80.0070.03717.60
5.6.70.0100.03317.60
5.6.60.0100.03017.55
5.6.50.0030.04017.54
5.6.40.0030.06317.58
5.6.30.0070.06317.50
5.6.20.0100.07717.57
5.6.10.0030.08017.43
5.6.00.0030.04017.45
5.5.350.0130.06020.43
5.5.340.0000.04317.88
5.5.330.0000.04017.91
5.5.320.0030.03718.02
5.5.310.0030.03718.02
5.5.300.0030.04017.91
5.5.290.0000.04717.88
5.5.280.0070.03717.91
5.5.270.0030.04017.91
5.5.260.0000.04318.01
5.5.250.0000.04017.68
5.5.240.0000.04017.28
5.5.230.0000.04017.29
5.5.220.0100.06717.36
5.5.210.0070.04317.29
5.5.200.0130.07317.32
5.5.190.0070.03717.33
5.5.180.0070.03717.35
5.5.160.0070.03717.33
5.5.150.0070.07717.35
5.5.140.0100.07017.33
5.5.130.0030.05717.35
5.5.120.0100.03317.23
5.5.110.0100.05317.25
5.5.100.0070.08017.13
5.5.90.0130.05317.25
5.5.80.0070.05717.14
5.5.70.0070.04317.25
5.5.60.0100.07317.16
5.5.50.0070.07317.16
5.5.40.0130.07017.20
5.5.30.0100.07717.07
5.5.20.0070.04717.20
5.5.10.0030.04717.16
5.5.00.0000.04317.15
5.4.450.0070.03319.32
5.4.440.0030.04019.42
5.4.430.0030.03719.43
5.4.420.0000.04019.53
5.4.410.0070.03719.18
5.4.400.0070.03319.02
5.4.390.0030.04018.97
5.4.380.0000.04018.83
5.4.370.0100.05719.13
5.4.360.0100.07018.97
5.4.350.0030.07719.24
5.4.340.0070.08018.98
5.4.320.0070.03719.03
5.4.310.0130.07318.98
5.4.300.0070.05018.97
5.4.290.0100.07318.96
5.4.280.0070.06319.20
5.4.270.0070.07318.98
5.4.260.0030.05318.83
5.4.250.0100.06018.88
5.4.240.0100.04318.98
5.4.230.0100.07718.88
5.4.220.0130.06719.20
5.4.210.0130.06719.06
5.4.200.0030.04019.00
5.4.190.0100.06718.97
5.4.180.0100.07319.11
5.4.170.0030.05718.97
5.4.160.0000.04718.95
5.4.150.0070.07719.05
5.4.140.0030.06716.42
5.4.130.0100.04016.40
5.4.120.0100.06316.24
5.4.110.0070.07716.41
5.4.100.0100.07016.30
5.4.90.0070.06316.28
5.4.80.0100.03316.46
5.4.70.0000.04316.35
5.4.60.0130.04016.26
5.4.50.0130.06316.26
5.4.40.0070.04316.30
5.4.30.0070.06316.39
5.4.20.0100.05716.34
5.4.10.0000.04316.16
5.4.00.0070.06315.93
5.3.290.0100.07314.66
5.3.280.0030.08314.56
5.3.270.0000.06714.69
5.3.260.0170.06014.52
5.3.250.0070.05014.59
5.3.240.0100.07014.54
5.3.230.0070.08014.55
5.3.220.0000.08014.36
5.3.210.0100.07714.48
5.3.200.0100.07014.48
5.3.190.0030.08314.34
5.3.180.0070.07314.55
5.3.170.0030.04014.53
5.3.160.0130.03714.54
5.3.150.0070.07314.51
5.3.140.0030.08014.51
5.3.130.0130.05014.37
5.3.120.0030.05014.50
5.3.110.0070.04714.51
5.3.100.0100.06013.82
5.3.90.0070.03313.97
5.3.80.0100.05713.99
5.3.70.0130.06713.98
5.3.60.0100.07013.76
5.3.50.0170.03313.71
5.3.40.0130.05013.93
5.3.30.0100.07013.88
5.3.20.0000.05713.67
5.3.10.0130.06313.61
5.3.00.0130.06713.62
5.2.170.0000.04010.97
5.2.160.0030.03011.14
5.2.150.0030.03310.98
5.2.140.0130.05311.12
5.2.130.0130.05710.95
5.2.120.0100.04311.07
5.2.110.0130.02311.09
5.2.100.0030.05311.07
5.2.90.0070.03311.13
5.2.80.0070.05310.88
5.2.70.0070.06010.99
5.2.60.0030.04011.20
5.2.50.0070.05711.05
5.2.40.0000.06011.04
5.2.30.0030.06310.96
5.2.20.0030.05310.97
5.2.10.0030.04010.76
5.2.00.0070.05010.76
5.1.60.0070.0539.94
5.1.50.0030.0609.97
5.1.40.0030.04710.13
5.1.30.0030.04710.33
5.1.20.0030.02710.42
5.1.10.0130.02310.05
5.1.00.0000.03710.11
5.0.50.0030.0438.50
5.0.40.0000.0338.42
5.0.30.0000.0708.27
5.0.20.0070.0408.17
5.0.10.0070.0438.25
5.0.00.0000.0638.20
4.4.90.0070.0177.71
4.4.80.0000.0207.71
4.4.70.0000.0377.71
4.4.60.0000.0207.71
4.4.50.0000.0377.71
4.4.40.0070.0477.71
4.4.30.0100.0237.71
4.4.20.0070.0137.71
4.4.10.0000.0207.71
4.4.00.0030.0537.71
4.3.110.0000.0337.71
4.3.100.0000.0407.71
4.3.90.0030.0277.71
4.3.80.0030.0537.71
4.3.70.0030.0377.71
4.3.60.0030.0277.71
4.3.50.0000.0407.71
4.3.40.0030.0537.71
4.3.30.0070.0337.71
4.3.20.0000.0337.71
4.3.10.0000.0377.71
4.3.00.0000.0337.71

preferences:
56.39 ms | 401 KiB | 5 Q