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 www.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) && !preg_match('%http://%',$pattern)) { $start = "http://"; } if(strlen($pattern) > 18) { $pattern_short = substr($pattern, 0, 10).substr($pattern, -7); } $text = str_replace($pattern, "<a href='".(isset($start) ? $start : '')."{$pattern}' target='_blank'>".(isset($pattern_short) ? $pattern_short : $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.0090.00618.55
8.3.60.0150.00718.68
8.3.50.0080.00921.29
8.3.40.0120.00618.98
8.3.30.0110.00319.19
8.3.20.0040.00420.40
8.3.10.0080.00022.10
8.3.00.0080.00022.20
8.2.190.0040.01116.63
8.2.180.0110.01116.75
8.2.170.0160.00322.96
8.2.160.0100.00721.14
8.2.150.0040.00424.18
8.2.140.0050.00524.66
8.2.130.0070.00726.16
8.2.120.0040.00419.74
8.2.110.0000.00922.33
8.2.100.0070.00417.84
8.2.90.0060.00319.40
8.2.80.0090.00018.04
8.2.70.0080.00017.88
8.2.60.0090.00017.93
8.2.50.0040.00418.07
8.2.40.0040.00418.16
8.2.30.0060.00318.30
8.2.20.0040.00417.80
8.2.10.0030.00619.73
8.2.00.0030.00517.86
8.1.280.0140.00725.92
8.1.270.0040.00423.96
8.1.260.0040.00426.35
8.1.250.0000.00928.09
8.1.240.0070.00323.83
8.1.230.0060.00619.10
8.1.220.0000.00817.77
8.1.210.0000.00818.77
8.1.200.0080.00417.48
8.1.190.0080.00017.53
8.1.180.0050.00318.10
8.1.170.0000.01118.55
8.1.160.0040.00421.99
8.1.150.0080.00018.89
8.1.140.0030.00517.67
8.1.130.0070.00017.92
8.1.120.0040.00417.58
8.1.110.0000.00917.55
8.1.100.0040.00417.61
8.1.90.0000.00717.58
8.1.80.0020.00517.60
8.1.70.0000.00817.51
8.1.60.0110.00417.64
8.1.50.0080.00017.59
8.1.40.0040.00417.68
8.1.30.0040.00417.83
8.1.20.0080.00017.70
8.1.10.0000.00717.65
8.1.00.0000.00817.69
8.0.300.0000.00718.77
8.0.290.0000.00717.40
8.0.280.0070.00018.51
8.0.270.0030.00317.23
8.0.260.0030.00316.93
8.0.250.0000.00717.09
8.0.240.0040.00417.16
8.0.230.0000.00717.01
8.0.220.0040.00417.06
8.0.210.0030.00517.07
8.0.200.0000.00617.02
8.0.190.0000.00717.10
8.0.180.0060.00317.11
8.0.170.0040.00417.05
8.0.160.0040.00417.13
8.0.150.0030.00517.00
8.0.140.0000.00817.05
8.0.130.0000.00613.46
8.0.120.0030.00617.02
8.0.110.0040.00417.00
8.0.100.0040.00417.00
8.0.90.0000.00717.11
8.0.80.0090.00617.11
8.0.70.0090.00017.00
8.0.60.0000.00717.18
8.0.50.0000.00716.95
8.0.30.0100.01217.03
8.0.20.0120.00917.41
8.0.10.0040.00417.16
8.0.00.0110.01016.83
7.4.330.0000.00615.11
7.4.320.0030.00316.83
7.4.300.0000.00716.85
7.4.290.0070.00016.76
7.4.280.0030.00316.86
7.4.270.0030.00316.82
7.4.260.0090.00016.85
7.4.250.0030.00516.76
7.4.240.0040.00416.79
7.4.230.0000.00716.82
7.4.220.0070.01116.87
7.4.210.0070.01116.73
7.4.200.0040.00416.82
7.4.190.0000.00716.72
7.4.160.0090.00916.64
7.4.150.0120.00617.40
7.4.140.0090.01117.86
7.4.130.0100.00816.79
7.4.120.0080.00816.71
7.4.110.0030.01616.72
7.4.100.0030.01416.57
7.4.90.0100.00716.66
7.4.80.0060.01219.39
7.4.70.0070.01016.69
7.4.60.0100.00616.51
7.4.50.0040.00416.63
7.4.40.0030.01222.77
7.4.30.0060.01016.75
7.4.00.0130.00515.26
7.3.330.0030.00313.29
7.3.320.0050.00313.40
7.3.310.0000.00716.56
7.3.300.0070.00016.50
7.3.290.0070.00716.49
7.3.280.0090.00916.52
7.3.270.0150.00317.40
7.3.260.0120.00916.52
7.3.250.0060.01216.63
7.3.240.0070.01016.77
7.3.230.0060.01016.39
7.3.210.0110.01116.56
7.3.200.0110.01119.39
7.3.190.0110.01216.55
7.3.180.0060.00916.82
7.3.170.0140.00616.56
7.3.160.0060.01616.71
7.3.120.0090.00615.13
7.3.110.0110.00714.91
7.3.100.0090.00615.34
7.3.90.0030.01315.13
7.3.80.0000.01414.95
7.3.70.0130.00315.12
7.3.60.0090.00615.13
7.3.50.0060.00314.93
7.3.40.0130.00614.93
7.3.30.0120.00615.16
7.3.20.0060.00617.00
7.3.10.0050.01016.79
7.3.00.0080.00816.85
7.2.330.0100.00716.75
7.2.320.0120.00616.86
7.2.310.0040.01216.86
7.2.300.0090.00916.79
7.2.290.0100.00716.74
7.2.250.0100.00715.29
7.2.240.0140.00715.02
7.2.230.0160.00015.50
7.2.220.0030.01315.49
7.2.210.0100.00315.22
7.2.200.0070.00415.43
7.2.190.0090.00015.37
7.2.180.0130.00315.50
7.2.170.0060.01215.22
7.2.130.0040.01117.12
7.2.120.0120.00617.11
7.2.110.0100.00017.07
7.2.100.0030.01317.34
7.2.90.0040.01217.02
7.2.80.0050.00517.07
7.2.70.0080.00817.24
7.2.60.0070.00817.20
7.2.50.0030.00617.21
7.2.40.0040.01117.14
7.2.30.0030.01317.02
7.2.20.0040.00717.13
7.2.10.0040.00717.30
7.2.00.0000.01518.52
7.1.330.0060.00615.86
7.1.320.0060.00815.77
7.1.310.0090.00315.99
7.1.300.0090.00315.71
7.1.290.0000.01515.73
7.1.280.0070.00716.02
7.1.270.0090.00916.14
7.1.260.0040.01215.78
7.1.250.0040.01115.80
7.1.200.0040.00816.09
7.1.100.0030.01318.57
7.1.70.0060.00317.30
7.1.60.0140.01119.82
7.1.50.0000.01817.28
7.1.00.0030.07722.36
7.0.200.0090.00616.93
7.0.140.0000.07321.95
7.0.100.0230.07019.91
7.0.90.0370.08019.88
7.0.80.0170.07720.14
7.0.70.0430.07019.87
7.0.60.0070.08719.90
7.0.50.0130.07720.22
7.0.40.0130.07720.04
7.0.30.0030.05020.11
7.0.20.0070.05319.96
7.0.10.0100.03720.09
7.0.00.0070.04019.99
5.6.280.0030.07021.08
5.6.250.0100.08020.79
5.6.240.0070.09020.73
5.6.230.0030.08720.63
5.6.220.0070.08020.49
5.6.210.0100.07320.59
5.6.200.0070.07721.05
5.6.190.0100.07320.96
5.6.180.0130.07021.09
5.6.170.0100.04321.09
5.6.160.0100.04321.06
5.6.150.0100.06321.05
5.6.140.0000.04721.12
5.6.130.0070.03721.07
5.6.120.0030.04321.11
5.6.110.0000.04321.08
5.6.100.0070.04021.10
5.6.90.0070.04321.16
5.6.80.0000.04020.34
5.6.70.0030.03720.55
5.6.60.0030.04020.42
5.6.50.0100.03320.32
5.6.40.0000.05320.38
5.6.30.0030.04020.49
5.6.20.0030.04720.38
5.6.10.0070.03720.39
5.6.00.0030.04020.43
5.5.380.0130.07320.42
5.5.370.0200.07020.43
5.5.360.0030.08720.39
5.5.350.0030.08720.37
5.5.340.0070.06320.75
5.5.330.0100.08020.93
5.5.320.0070.04720.88
5.5.310.0000.05020.91
5.5.300.0000.05320.91
5.5.290.0000.04720.74
5.5.280.0000.04320.86
5.5.270.0070.04320.64
5.5.260.0130.04720.89
5.5.250.0030.04020.62
5.5.240.0100.05320.20
5.5.230.0130.04020.25
5.5.220.0000.04320.26
5.5.210.0070.03720.03
5.5.200.0000.04720.24
5.5.190.0030.05320.25
5.5.180.0000.04020.25
5.5.160.0030.04020.10
5.5.150.0070.03720.24
5.5.140.0030.04020.19
5.5.130.0000.04320.22
5.5.120.0030.03720.21
5.5.110.0000.04320.28
5.5.100.0000.05020.16
5.5.90.0000.04320.03
5.5.80.0130.03020.02
5.5.70.0070.03320.15
5.5.60.0030.04019.93
5.5.50.0030.04020.01
5.5.40.0000.05319.93
5.5.30.0130.06720.05
5.5.20.0000.09020.15
5.5.10.0070.07720.01
5.5.00.0070.07319.96
5.4.450.0000.04319.29
5.4.440.0070.05019.35
5.4.430.0030.03719.41
5.4.420.0030.04019.38
5.4.410.0100.03319.22
5.4.400.0070.03719.12
5.4.390.0030.03719.05
5.4.380.0100.05319.04
5.4.370.0030.06018.97
5.4.360.0070.04719.06
5.4.350.0070.03718.81
5.4.340.0030.04018.96
5.4.320.0070.03718.97
5.4.310.0070.03318.96
5.4.300.0030.04018.97
5.4.290.0000.04019.12
5.4.280.0030.03719.03
5.4.270.0000.03718.98
5.4.260.0030.03319.10
5.4.250.0030.03318.98
5.4.240.0100.04718.94
5.4.230.0000.04019.13
5.4.220.0030.04019.04
5.4.210.0100.03019.14
5.4.200.0070.04719.11
5.4.190.0070.06019.02
5.4.180.0030.04319.03
5.4.170.0100.07719.14
5.4.160.0130.06719.11
5.4.150.0070.07319.01
5.4.140.0000.08016.44
5.4.130.0030.07316.32
5.4.120.0130.04016.42
5.4.110.0030.07316.46
5.4.100.0030.07716.49
5.4.90.0070.06316.32
5.4.80.0030.06316.31
5.4.70.0070.04316.43
5.4.60.0130.06316.30
5.4.50.0030.07716.39
5.4.40.0070.07716.38
5.4.30.0070.07316.36
5.4.20.0030.07716.21
5.4.10.0200.05716.28
5.4.00.0030.06315.71
5.3.290.0070.05014.68
5.3.280.0030.04014.45
5.3.270.0100.07314.61
5.3.260.0100.07714.60
5.3.250.0100.06714.62
5.3.240.0070.07314.46
5.3.230.0100.06714.62
5.3.220.0070.07314.52
5.3.210.0070.05714.44
5.3.200.0070.06714.43
5.3.190.0170.06714.44
5.3.180.0070.07014.54
5.3.170.0100.06314.42
5.3.160.0130.06714.39
5.3.150.0030.07314.54
5.3.140.0100.07014.43
5.3.130.0100.07314.50
5.3.120.0070.08014.56
5.3.110.0170.06314.47
5.3.100.0030.08314.03
5.3.90.0030.07313.98
5.3.80.0070.07313.98
5.3.70.0130.07313.88
5.3.60.0100.05314.02
5.3.50.0100.07013.92
5.3.40.0100.07013.96
5.3.30.0100.07013.70
5.3.20.0000.04013.56
5.3.10.0030.07313.43
5.3.00.0000.07713.59
5.2.170.0070.05711.16
5.2.160.0030.06710.99
5.2.150.0070.06011.11
5.2.140.0000.03711.15
5.2.130.0100.05311.07
5.2.120.0100.05711.16
5.2.110.0070.05711.18
5.2.100.0000.06711.16
5.2.90.0070.05311.11
5.2.80.0070.05711.07
5.2.70.0030.04011.09
5.2.60.0030.05311.05
5.2.50.0000.04710.85
5.2.40.0030.03311.00
5.2.30.0070.06010.95
5.2.20.0030.06311.02
5.2.10.0100.04710.90
5.2.00.0030.05010.79
5.1.60.0070.02710.01
5.1.50.0030.05010.06
5.1.40.0000.05310.02
5.1.30.0070.05710.28
5.1.20.0030.05710.29
5.1.10.0000.0609.91
5.1.00.0100.05310.07
5.0.50.0070.0239.45
5.0.40.0030.0409.45
5.0.30.0070.0609.45
5.0.20.0030.0439.45
5.0.10.0070.0439.45
5.0.00.0030.0609.45
4.4.90.0000.0409.45
4.4.80.0030.0339.45
4.4.70.0000.0379.45
4.4.60.0130.0239.45
4.4.50.0000.0209.45
4.4.40.0030.0539.45
4.4.30.0030.0339.45
4.4.20.0000.0209.45
4.4.10.0030.0379.45
4.4.00.0030.0539.45
4.3.110.0030.0379.45
4.3.100.0070.0279.45
4.3.90.0030.0339.45
4.3.80.0030.0409.45
4.3.70.0000.0279.45
4.3.60.0030.0179.45
4.3.50.0000.0409.45
4.3.40.0000.0579.45
4.3.30.0030.0179.45
4.3.20.0000.0209.45
4.3.10.0030.0179.45
4.3.00.0070.0309.45

preferences:
45.55 ms | 401 KiB | 5 Q