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://mybreaktrip.cs.bsbm.eu/trip/view_bids/vienna-tripbsbm-ltd'; 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) { $parseurl = parse_url($pattern); $pattern_short = $host.substr($parseurl['path'], 0, 5).'(...)'.substr($parseurl['path'], -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.60.0160.00618.53
8.3.50.0060.00918.27
8.3.40.0120.00318.77
8.3.30.0210.00019.12
8.3.20.0030.00620.28
8.3.10.0080.00022.10
8.3.00.0080.00022.46
8.2.180.0070.00716.75
8.2.170.0040.01122.96
8.2.160.0070.00720.96
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00419.74
8.2.110.0090.00022.38
8.2.100.0060.00618.09
8.2.90.0030.00519.25
8.2.80.0040.00418.05
8.2.70.0030.00617.88
8.2.60.0040.00418.03
8.2.50.0040.00418.07
8.2.40.0000.00818.34
8.2.30.0000.00718.04
8.2.20.0030.00617.94
8.2.10.0070.00017.91
8.2.00.0050.00518.04
8.1.270.0000.00722.31
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0030.00623.73
8.1.230.0040.00819.09
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0060.00317.60
8.1.190.0000.00817.54
8.1.180.0030.00518.10
8.1.170.0050.00518.84
8.1.160.0050.00221.93
8.1.150.0030.00518.81
8.1.140.0030.00617.64
8.1.130.0030.00317.84
8.1.120.0000.00717.56
8.1.110.0030.00517.58
8.1.100.0000.00717.51
8.1.90.0000.00717.52
8.1.80.0040.00417.64
8.1.70.0000.00817.61
8.1.60.0040.00417.73
8.1.50.0000.00717.67
8.1.40.0000.00917.68
8.1.30.0040.00417.66
8.1.20.0060.00317.82
8.1.10.0040.00417.80
8.1.00.0030.00517.74
8.0.300.0040.00418.77
8.0.290.0000.00817.30
8.0.280.0030.00318.49
8.0.270.0040.00417.25
8.0.260.0030.00317.05
8.0.250.0080.00017.20
8.0.240.0030.00317.23
8.0.230.0030.00317.06
8.0.220.0040.00417.09
8.0.210.0070.00017.13
8.0.200.0000.00617.08
8.0.190.0000.00817.21
8.0.180.0000.00817.12
8.0.170.0000.00717.19
8.0.160.0000.00817.19
8.0.150.0040.00417.05
8.0.140.0030.00517.12
8.0.130.0030.00313.44
8.0.120.0040.00417.08
8.0.110.0050.00317.16
8.0.100.0070.00017.16
8.0.90.0080.00016.95
8.0.80.0120.00317.13
8.0.70.0070.00016.97
8.0.60.0050.00317.11
8.0.50.0020.00517.17
8.0.30.0100.00917.33
8.0.20.0060.01417.41
8.0.10.0040.00417.36
8.0.00.0090.00816.97
7.4.330.0050.00015.13
7.4.320.0030.00316.86
7.4.300.0040.00416.76
7.4.290.0090.00016.76
7.4.280.0030.00316.84
7.4.270.0030.00616.77
7.4.260.0000.00716.66
7.4.250.0040.00416.81
7.4.240.0020.00516.73
7.4.230.0030.00316.64
7.4.220.0060.01316.80
7.4.210.0060.00916.83
7.4.200.0060.00316.59
7.4.190.0040.00416.93
7.4.160.0090.00616.61
7.4.150.0030.01317.40
7.4.140.0130.00517.86
7.4.130.0100.00816.71
7.4.120.0100.00716.82
7.4.110.0060.01216.67
7.4.100.0090.00916.80
7.4.90.0120.00616.73
7.4.80.0110.01119.39
7.4.70.0080.00816.98
7.4.60.0090.00616.82
7.4.50.0000.00816.73
7.4.40.0040.01122.77
7.4.30.0100.01016.63
7.4.00.0030.01515.21
7.3.330.0030.00313.46
7.3.320.0000.00513.29
7.3.310.0030.00316.70
7.3.300.0050.00316.43
7.3.290.0100.00316.51
7.3.280.0140.00716.59
7.3.270.0100.01117.40
7.3.260.0080.00816.54
7.3.250.0110.00616.77
7.3.240.0040.01316.68
7.3.230.0040.01316.55
7.3.210.0140.00316.79
7.3.200.0100.01319.39
7.3.190.0100.00716.91
7.3.180.0040.01216.84
7.3.170.0060.01016.56
7.3.160.0030.01316.57
7.3.120.0070.01015.05
7.3.110.0070.01214.87
7.3.100.0080.00914.93
7.3.90.0050.01015.17
7.3.80.0050.00715.23
7.3.70.0070.00815.08
7.3.60.0060.01114.96
7.3.50.0030.00815.05
7.3.40.0020.01314.95
7.3.30.0090.00514.89
7.3.20.0050.01116.78
7.3.10.0040.00716.93
7.3.00.0060.00416.76
7.2.330.0030.01416.80
7.2.320.0030.01416.90
7.2.310.0070.01516.79
7.2.300.0040.01416.82
7.2.290.0090.00916.95
7.2.250.0080.01015.21
7.2.240.0050.01315.12
7.2.230.0060.01015.37
7.2.220.0050.01115.28
7.2.210.0020.01415.23
7.2.200.0060.01015.17
7.2.190.0060.00415.27
7.2.180.0060.00815.21
7.2.170.0050.01015.31
7.2.60.0030.01017.25
7.1.330.0050.00815.97
7.1.320.0070.00415.99
7.1.310.0060.00515.81
7.1.300.0070.00515.98
7.1.290.0060.00516.00
7.1.280.0070.00515.81
7.1.270.0060.00615.84
7.1.260.0020.01015.88
7.1.200.0030.00915.75
7.1.70.0040.00717.12
7.1.60.0070.01119.82
7.1.50.0100.01317.14
7.1.00.0030.07722.34
7.0.200.0030.00316.68
7.0.140.0100.06322.14
7.0.110.0670.07720.02
7.0.100.0170.07019.95
7.0.90.0200.07719.87
7.0.80.0170.06719.86
7.0.70.0170.07319.88
7.0.60.0100.09020.02
7.0.50.0170.08020.21
7.0.40.0130.07719.91
7.0.30.0100.08320.08
7.0.20.0100.06719.99
7.0.10.0170.07020.10
7.0.00.0130.06719.99
5.6.280.0000.07721.08
5.6.250.0070.08320.64
5.6.240.0130.08020.65
5.6.230.0070.07720.47
5.6.220.0070.08020.63
5.6.210.0100.08020.57
5.6.200.0100.06721.24
5.6.190.0070.08321.11
5.6.180.0100.07320.90
5.6.170.0130.06721.15
5.6.160.0100.08021.24
5.6.150.0070.05721.05
5.6.140.0100.07321.09
5.6.130.0130.07321.20
5.6.120.0130.07720.93
5.6.110.0100.06721.13
5.6.100.0230.06721.08
5.6.90.0030.07021.14
5.6.80.0030.07020.43
5.6.70.0070.06020.60
5.6.60.0000.08020.30
5.6.50.0030.07720.52
5.6.40.0070.07720.46
5.6.30.0100.05020.25
5.6.20.0170.06720.40
5.6.10.0000.08020.25
5.6.00.0100.07720.44
5.5.380.0030.08320.47
5.5.370.0030.05020.33
5.5.360.0100.07020.48
5.5.350.0100.07020.45
5.5.340.0200.07320.73
5.5.330.0030.08320.94
5.5.320.0130.07720.79
5.5.310.0130.07720.79
5.5.300.0070.06720.84
5.5.290.0070.08320.90
5.5.280.0070.06020.62
5.5.270.0070.08020.79
5.5.260.0030.08020.64
5.5.250.0000.05020.54
5.5.240.0200.03720.21
5.5.230.0000.05320.11
5.5.220.0030.08320.27
5.5.210.0100.06320.14
5.5.200.0070.07720.12
5.5.190.0000.07320.17
5.5.180.0070.08320.11
5.5.160.0230.06020.11
5.5.150.0000.08320.19
5.5.140.0070.08020.17
5.5.130.0130.07320.25
5.5.120.0130.07720.09
5.5.110.0000.05320.00
5.5.100.0000.08020.11
5.5.90.0030.07720.12
5.5.80.0070.07720.04
5.5.70.0030.07719.99
5.5.60.0030.07320.13
5.5.50.0100.07320.11
5.5.40.0070.04720.16
5.5.30.0030.08020.10
5.5.20.0100.07319.91
5.5.10.0000.05020.19
5.5.00.0000.08020.17
5.4.450.0170.07319.55
5.4.440.0070.06719.57
5.4.430.0000.08319.29
5.4.420.0000.07719.35
5.4.410.0100.06719.27
5.4.400.0270.04719.01
5.4.390.0000.08319.00
5.4.380.0000.04019.07
5.4.370.0070.06319.13
5.4.360.0070.07319.04
5.4.350.0030.08019.10
5.4.340.0070.07018.93
5.4.320.0130.07018.98
5.4.310.0070.05019.09
5.4.300.0070.07319.03
5.4.290.0070.08019.21
5.4.280.0070.04718.96
5.4.270.0000.07319.03
5.4.260.0130.03719.00
5.4.250.0170.07019.17
5.4.240.0130.07019.17
5.4.230.0070.07019.00
5.4.220.0070.07319.11
5.4.210.0070.07319.21
5.4.200.0100.07018.98
5.4.190.0000.07718.99
5.4.180.0070.07718.99
5.4.170.0100.04018.99
5.4.160.0130.06719.15
5.4.150.0030.06319.22
5.4.140.0000.07016.39
5.4.130.0070.07016.43
5.4.120.0070.06716.36
5.4.110.0070.07016.52
5.4.100.0070.06316.53
5.4.90.0100.06716.43
5.4.80.0070.06316.52
5.4.70.0030.07316.44
5.4.60.0070.04716.24
5.4.50.0100.06716.46
5.4.40.0100.07016.42
5.4.30.0100.05316.27
5.4.20.0070.06016.48
5.4.10.0030.05716.45
5.4.00.0030.04015.64
5.3.290.0030.07314.75
5.3.280.0070.08014.63
5.3.270.0100.06714.47
5.3.260.0030.08014.51
5.3.250.0070.04014.55
5.3.240.0030.05014.55
5.3.230.0200.02314.45
5.3.220.0130.05014.47
5.3.210.0070.03714.65
5.3.200.0030.07714.37
5.3.190.0030.04314.55
5.3.180.0000.08314.47
5.3.170.0070.07714.43
5.3.160.0000.05014.50
5.3.150.0000.07714.48
5.3.140.0100.04314.51
5.3.130.0070.07314.41
5.3.120.0070.06314.62
5.3.110.0000.05014.56
5.3.100.0030.03713.99
5.3.90.0030.07013.93
5.3.80.0000.03713.85
5.3.70.0070.06714.09
5.3.60.0130.05714.08
5.3.50.0100.06313.88
5.3.40.0070.06313.78
5.3.30.0030.05713.98
5.3.20.0070.07313.71
5.3.10.0170.05713.60
5.3.00.0100.05713.51
5.2.170.0000.06311.10
5.2.160.0070.05311.08
5.2.150.0000.06311.08
5.2.140.0100.06011.09
5.2.130.0030.06311.04
5.2.120.0030.06011.18
5.2.110.0070.05311.11
5.2.100.0000.06011.05
5.2.90.0000.06311.06
5.2.80.0030.06011.03
5.2.70.0070.06011.27
5.2.60.0000.06311.07
5.2.50.0100.05710.96
5.2.40.0000.06710.94
5.2.30.0070.05310.93
5.2.20.0070.06310.99
5.2.10.0000.05010.86
5.2.00.0000.05310.95
5.1.60.0070.0409.94
5.1.50.0100.0439.93
5.1.40.0000.0279.96
5.1.30.0000.06010.24
5.1.20.0000.03310.44
5.1.10.0030.0579.97
5.1.00.0030.0409.98
5.0.50.0100.0309.86
5.0.40.0000.0439.86
5.0.30.0100.0479.86
5.0.20.0000.0439.86
5.0.10.0130.0279.86
5.0.00.0000.0639.86
4.4.90.0030.0309.86
4.4.80.0000.0379.86
4.4.70.0030.0179.86
4.4.60.0000.0379.86
4.4.50.0000.0339.86
4.4.40.0000.0579.86
4.4.30.0000.0239.86
4.4.20.0000.0379.86
4.4.10.0000.0309.86
4.4.00.0130.0439.86
4.3.110.0030.0339.86
4.3.100.0030.0209.86
4.3.90.0030.0309.86
4.3.80.0000.0609.86
4.3.70.0000.0209.86
4.3.60.0030.0209.86
4.3.50.0000.0309.86
4.3.40.0000.0479.86
4.3.30.0000.0379.86
4.3.20.0000.0379.86
4.3.10.0000.0209.86
4.3.00.0000.0279.86

preferences:
56.29 ms | 400 KiB | 5 Q