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); echo '<br/>'; print_r($parseurl); //$pattern_short = substr($pattern_short, 0, 10).'(...)/'.substr($pattern_short, -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.40.0070.00718.92
8.3.30.0070.00719.34
8.3.20.0000.00720.20
8.3.10.0030.00522.02
8.3.00.0040.00420.58
8.2.170.0140.00722.96
8.2.160.0100.01020.81
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0030.00726.16
8.2.120.0080.00019.61
8.2.110.0040.00422.38
8.2.100.0110.00717.72
8.2.90.0040.00419.22
8.2.80.0080.00017.97
8.2.70.0060.00317.88
8.2.60.0080.00017.93
8.2.50.0040.00418.07
8.2.40.0040.00418.34
8.2.30.0030.00618.17
8.2.20.0040.00417.97
8.2.10.0000.00819.75
8.2.00.0090.00018.00
8.1.270.0080.00022.19
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0030.00623.97
8.1.230.0070.00419.16
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0080.00017.63
8.1.180.0000.00818.10
8.1.170.0040.00418.84
8.1.160.0040.00422.05
8.1.150.0000.00718.72
8.1.140.0070.00317.54
8.1.130.0000.00717.86
8.1.120.0040.00417.61
8.1.110.0050.00217.60
8.1.100.0020.00517.60
8.1.90.0020.00517.52
8.1.80.0040.00417.61
8.1.70.0000.00717.53
8.1.60.0080.00017.67
8.1.50.0050.00317.58
8.1.40.0000.00817.63
8.1.30.0050.00317.82
8.1.20.0000.00917.71
8.1.10.0030.00517.81
8.1.00.0060.00317.75
8.0.300.0040.00418.77
8.0.290.0070.00017.16
8.0.280.0030.00318.53
8.0.270.0030.00317.21
8.0.260.0000.00716.90
8.0.250.0100.00017.05
8.0.240.0040.00417.04
8.0.230.0040.00417.11
8.0.220.0040.00417.04
8.0.210.0030.00317.08
8.0.200.0040.00417.01
8.0.190.0070.00017.00
8.0.180.0000.00717.08
8.0.170.0040.00416.98
8.0.160.0040.00416.96
8.0.150.0000.00717.07
8.0.140.0030.00517.02
8.0.130.0070.00013.49
8.0.120.0040.00416.92
8.0.110.0080.00017.03
8.0.100.0070.00016.86
8.0.90.0080.00017.11
8.0.80.0120.00316.96
8.0.70.0050.00216.89
8.0.60.0070.00016.91
8.0.50.0000.00716.85
8.0.30.0100.00817.16
8.0.20.0110.01017.40
8.0.10.0060.00317.24
8.0.00.0120.01016.99
7.4.330.0050.00015.15
7.4.320.0030.00316.59
7.4.300.0070.00016.82
7.4.290.0040.00816.82
7.4.280.0070.00016.78
7.4.270.0060.00316.75
7.4.260.0000.00716.71
7.4.250.0080.00016.74
7.4.240.0020.00616.76
7.4.230.0000.00816.71
7.4.220.0070.01316.79
7.4.210.0060.01016.86
7.4.200.0040.00416.86
7.4.190.0040.00417.00
7.4.160.0090.00616.61
7.4.150.0070.01117.40
7.4.140.0150.00317.86
7.4.130.0030.01416.78
7.4.120.0110.00616.70
7.4.110.0130.01016.71
7.4.100.0130.01016.58
7.4.90.0070.01016.80
7.4.80.0040.02119.39
7.4.70.0090.00816.78
7.4.60.0090.00616.80
7.4.50.0030.00616.68
7.4.40.0060.01022.77
7.4.30.0130.00316.70
7.4.00.0090.00615.18
7.3.330.0030.00313.23
7.3.320.0000.00513.34
7.3.310.0070.00016.57
7.3.300.0070.00016.52
7.3.290.0090.00616.46
7.3.280.0120.00816.53
7.3.270.0110.00717.40
7.3.260.0200.01416.55
7.3.250.0090.00916.73
7.3.240.0030.01316.82
7.3.230.0150.00316.53
7.3.210.0070.01016.75
7.3.200.0120.00619.39
7.3.190.0170.00016.57
7.3.180.0110.00516.75
7.3.170.0070.01016.53
7.3.160.0090.00616.42
7.3.120.0000.01615.26
7.3.10.0030.01016.63
7.3.00.0060.00916.92
7.2.330.0090.01516.97
7.2.320.0070.01116.99
7.2.310.0070.01416.71
7.2.300.0000.01716.86
7.2.290.0090.00816.92
7.2.130.0090.00617.23
7.2.120.0030.01317.14
7.2.110.0030.01417.20
7.2.100.0090.00917.15
7.2.90.0120.00317.36
7.2.80.0030.01017.17
7.2.70.0030.00717.20
7.2.60.0090.00617.02
7.2.50.0040.00717.06
7.2.40.0100.00317.04
7.2.30.0070.01017.30
7.2.20.0030.01316.90
7.2.10.0060.00617.18
7.2.00.0100.01018.28
7.1.250.0000.00916.07
7.1.100.0070.00718.48
7.1.70.0000.00817.18
7.1.60.0110.01819.82
7.1.50.0070.01617.06
7.1.00.0030.07322.46
7.0.200.0160.00016.89
7.0.140.0100.06721.95
7.0.60.0100.03719.99
7.0.50.0230.06017.83
7.0.40.0070.08719.93
7.0.30.0630.06020.06
7.0.20.0230.08020.46
7.0.10.0070.04020.01
7.0.00.0100.04020.01
5.6.280.0100.06720.79
5.6.210.0100.07720.52
5.6.200.0030.04018.18
5.6.190.0000.06320.57
5.6.180.0430.05720.60
5.6.170.0230.06720.71
5.6.160.0100.04020.46
5.6.150.0100.05318.21
5.6.140.0130.07318.20
5.6.130.0130.08018.21
5.6.120.0030.05320.99
5.6.110.0170.07721.02
5.6.100.0030.04320.98
5.6.90.0170.07320.99
5.6.80.0100.07020.44
5.5.350.4300.04020.34
5.5.340.0130.07017.92
5.5.330.0130.07320.06
5.5.320.0400.06720.28
5.5.310.0430.07020.26
5.5.300.0000.05318.02
5.5.290.0070.06317.92
5.5.280.0000.04320.66
5.5.270.0070.03720.90
5.5.260.0130.08020.77
5.5.250.0100.07720.67
5.5.240.0130.06720.16
5.4.450.0630.05019.21
5.4.440.0430.03319.41
5.4.430.1330.00019.41
5.4.420.1330.00019.23
5.4.410.0130.05018.70
5.4.400.0100.05018.77
5.4.390.0200.04318.77
5.4.380.0300.05018.53
5.4.370.0300.04718.54
5.4.360.0200.05018.77
5.4.350.0270.05318.72
5.4.340.0370.03718.68
5.4.320.0050.03812.46
5.4.310.0060.03912.46
5.4.300.0050.03912.46
5.4.290.0030.04112.46
5.4.280.0090.03412.34
5.4.270.0060.04212.34
5.4.260.0090.03912.34
5.4.250.0060.04112.34
5.4.240.0090.03812.34
5.4.230.0050.04212.33
5.4.220.0060.05212.33
5.4.210.0080.04912.34
5.4.200.0100.04812.34
5.4.190.0100.04812.33
5.4.180.0060.04912.33
5.4.170.0050.05312.34
5.4.160.0050.04612.34
5.4.150.0110.05012.34
5.4.140.0100.04812.02
5.4.130.0130.04312.00
5.4.120.0070.05011.96
5.4.110.0080.04811.96
5.4.100.0050.04211.96
5.4.90.0030.04011.96
5.4.80.0030.04211.96
5.4.70.0040.03811.95
5.4.60.0070.04811.95
5.4.50.0060.05011.95
5.4.40.0060.04911.94
5.4.30.0120.04311.95
5.4.20.0070.04511.94
5.4.10.0070.04911.94
5.4.00.0060.04111.44
5.3.290.0080.03612.80
5.3.280.0080.03812.71
5.3.270.0110.03512.73
5.3.260.0070.04212.72
5.3.250.0040.04012.72
5.3.240.0080.04312.72
5.3.230.0050.04312.71
5.3.220.0080.03712.68
5.3.210.0030.04412.68
5.3.200.0060.03812.68
5.3.190.0080.03712.68
5.3.180.0070.05312.68
5.3.170.0080.05312.67
5.3.160.0090.05012.68
5.3.150.0100.05112.67
5.3.140.0080.05812.66
5.3.130.0100.05112.66
5.3.120.0100.05112.66
5.3.110.0040.05712.66
5.3.100.0040.03812.12
5.3.90.0050.03812.08
5.3.80.0040.03912.07
5.3.70.0070.03712.07
5.3.60.0110.03412.06
5.3.50.0110.04512.00
5.3.40.0080.04812.00
5.3.30.0090.03411.95
5.3.20.0070.03511.73
5.3.10.0060.03711.70
5.3.00.0100.04611.68
5.2.170.0100.0389.18
5.2.160.0080.0389.18
5.2.150.0060.0419.18
5.2.140.0090.0359.18
5.2.130.0090.0369.14
5.2.120.0030.0369.14
5.2.110.0050.0399.14
5.2.100.0060.0389.14
5.2.90.0060.0399.14
5.2.80.0060.0329.13
5.2.70.0070.0309.13
5.2.60.0010.0349.09
5.2.50.0050.0309.06
5.2.40.0020.0339.05
5.2.30.0060.0309.02
5.2.20.0040.0329.00
5.2.10.0040.0318.93
5.2.00.0060.0318.79
5.1.60.0080.0298.07
5.1.50.0040.0358.07
5.1.40.0060.0288.05
5.1.30.0060.0328.40
5.1.20.0060.0258.43
5.1.10.0030.0288.15
5.1.00.0020.0288.15
5.0.50.0050.0216.62
5.0.40.0060.0186.49
5.0.30.0050.0316.30
5.0.20.0040.0226.27
5.0.10.0050.0256.25
5.0.00.0100.0346.25
4.4.90.0050.0214.78
4.4.80.0040.0194.76
4.4.70.0040.0224.75
4.4.60.0020.0184.76
4.4.50.0070.0194.77
4.4.40.0030.0274.71
4.4.30.0040.0214.75
4.4.20.0060.0204.84
4.4.10.0060.0204.85
4.4.00.0020.0324.76
4.3.110.0070.0134.67
4.3.100.0020.0164.66
4.3.90.0030.0154.63
4.3.80.0020.0264.58
4.3.70.0050.0124.63
4.3.60.0030.0154.62
4.3.50.0030.0154.63
4.3.40.0020.0264.54
4.3.30.0040.0153.30
4.3.20.0030.0153.29
4.3.10.0010.0173.25
4.3.00.0330.02015.60

preferences:
43.21 ms | 400 KiB | 5 Q