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) { $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.40.0120.00318.74
8.3.30.0110.00419.17
8.3.20.0060.00320.20
8.3.10.0040.01422.10
8.3.00.0050.00322.40
8.2.170.0040.01122.96
8.2.160.0040.01221.05
8.2.150.0090.00024.18
8.2.140.0040.01124.66
8.2.130.0040.00426.16
8.2.120.0080.00019.74
8.2.110.0000.01022.25
8.2.100.0120.00019.95
8.2.90.0060.00319.14
8.2.80.0060.00317.97
8.2.70.0000.00917.88
8.2.60.0040.00417.93
8.2.50.0000.00918.07
8.2.40.0040.00818.05
8.2.30.0000.00718.13
8.2.20.0030.00517.96
8.2.10.0020.00517.93
8.2.00.0060.00317.99
8.1.270.0040.01122.26
8.1.260.0080.00026.35
8.1.250.0080.00828.09
8.1.240.0050.00523.79
8.1.230.0080.00819.11
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0060.00317.60
8.1.190.0040.00417.53
8.1.180.0040.00418.10
8.1.170.0060.00318.61
8.1.160.0040.00422.06
8.1.150.0040.00418.71
8.1.140.0000.00717.67
8.1.130.0030.00317.89
8.1.120.0040.00417.55
8.1.110.0050.00217.57
8.1.100.0000.00817.63
8.1.90.0040.00417.45
8.1.80.0000.00717.54
8.1.70.0000.00817.53
8.1.60.0040.00417.81
8.1.50.0040.00417.59
8.1.40.0090.00017.59
8.1.30.0050.00317.75
8.1.20.0040.00417.77
8.1.10.0040.00417.62
8.1.00.0040.00417.53
8.0.300.0040.00418.77
8.0.290.0060.00317.17
8.0.280.0030.00318.49
8.0.270.0030.00317.25
8.0.260.0070.00016.99
8.0.250.0030.00317.04
8.0.240.0000.00717.19
8.0.230.0050.00317.16
8.0.220.0040.00417.08
8.0.210.0030.00316.95
8.0.200.0000.00617.16
8.0.190.0050.00317.16
8.0.180.0040.00417.14
8.0.170.0080.00017.11
8.0.160.0040.00417.01
8.0.150.0030.00517.06
8.0.140.0040.00417.08
8.0.130.0030.00313.51
8.0.120.0040.00416.99
8.0.110.0000.00916.98
8.0.100.0040.00416.96
8.0.90.0080.00017.11
8.0.80.0040.01117.02
8.0.70.0040.00417.09
8.0.60.0040.00417.14
8.0.50.0040.00417.05
8.0.30.0090.01417.46
8.0.20.0130.00617.40
8.0.10.0060.00317.21
8.0.00.0070.01017.01
7.4.330.0000.00615.08
7.4.320.0030.00316.85
7.4.300.0070.00016.84
7.4.290.0000.00816.70
7.4.280.0000.00716.84
7.4.270.0000.00816.68
7.4.260.0040.00416.87
7.4.250.0040.00416.72
7.4.240.0030.00516.82
7.4.230.0030.00316.93
7.4.220.0120.00616.88
7.4.210.0110.00516.76
7.4.200.0000.00716.72
7.4.190.0030.00316.65
7.4.160.0150.00016.84
7.4.150.0150.00417.40
7.4.140.0090.01017.86
7.4.130.0140.00516.78
7.4.120.0130.01016.75
7.4.110.0110.00616.91
7.4.100.0030.01916.80
7.4.90.0270.01216.73
7.4.80.0190.00319.39
7.4.70.0070.01016.67
7.4.60.0060.00916.57
7.4.50.0040.00416.65
7.4.40.0130.00322.77
7.4.30.0070.01016.94
7.4.00.0110.00714.96
7.3.330.0030.00413.23
7.3.320.0030.00313.22
7.3.310.0080.00016.44
7.3.300.0030.00316.52
7.3.290.0110.01016.61
7.3.280.0090.01016.45
7.3.270.0120.00617.40
7.3.260.0050.01416.66
7.3.250.0090.01316.82
7.3.240.0100.00716.46
7.3.230.0110.01116.66
7.3.210.0050.01416.52
7.3.200.0100.01319.39
7.3.190.0030.01416.80
7.3.180.0050.01316.54
7.3.170.0140.00316.59
7.3.160.0110.01016.63
7.3.120.0010.01115.20
7.3.110.0110.00714.99
7.3.100.0100.01015.04
7.3.90.0070.01314.78
7.3.80.0100.00315.00
7.3.70.0000.01615.02
7.3.60.0000.00914.95
7.3.50.0030.01015.09
7.3.40.0040.01115.02
7.3.30.0090.00915.11
7.3.20.0060.01016.84
7.3.10.0070.01116.77
7.3.00.0100.00316.77
7.2.330.0110.00616.69
7.2.320.0150.00316.82
7.2.310.0100.01016.79
7.2.300.0090.00916.83
7.2.290.0060.01016.85
7.2.250.0080.01215.05
7.2.240.0090.00915.19
7.2.230.0070.01415.32
7.2.220.0000.01315.18
7.2.210.0070.00715.34
7.2.200.0060.00915.26
7.2.190.0000.01215.25
7.2.180.0140.00015.34
7.2.170.0030.00914.93
7.2.00.0100.00719.92
7.1.330.0070.01016.17
7.1.320.0030.00715.95
7.1.310.0030.01215.80
7.1.300.0110.00415.98
7.1.290.0070.00315.65
7.1.280.0090.00915.78
7.1.270.0030.01415.96
7.1.260.0040.00715.72
7.1.200.0030.01015.78
7.1.100.0390.00618.31
7.1.70.0100.00017.46
7.1.60.0100.01319.82
7.1.50.0070.01417.07
7.1.00.0030.07722.29
7.0.200.0100.00316.67
7.0.140.0030.07321.98
7.0.60.0130.08019.96
7.0.50.0100.06317.89
7.0.40.0130.03320.21
7.0.30.0300.07720.18
7.0.20.0270.04720.15
7.0.10.0130.05320.14
7.0.00.0000.04720.03
5.6.280.0070.07021.01
5.6.210.0030.08320.51
5.6.200.0100.08018.12
5.6.190.0030.05720.50
5.6.180.3470.03720.61
5.6.170.0200.08020.52
5.6.160.0100.08320.49
5.6.150.0100.07718.18
5.6.140.0030.08718.13
5.6.130.0130.04018.18
5.6.120.0070.07320.97
5.6.110.0130.07021.09
5.6.100.0030.07721.11
5.6.90.0030.04720.99
5.6.80.0170.07320.51
5.6.70.0130.06720.51
5.5.350.0170.05720.43
5.5.340.0030.04318.00
5.5.330.0030.08720.29
5.5.320.0370.08020.50
5.5.310.0270.06020.33
5.5.300.0030.06017.96
5.5.290.0130.08317.96
5.5.280.0070.04020.80
5.5.270.0170.08020.77
5.5.260.0030.08320.82
5.5.250.0100.06020.55
5.5.240.0130.07320.38
5.4.450.0230.05019.57
5.4.440.0300.06719.21
5.4.430.0130.06019.42
5.4.420.0170.05719.14
5.4.410.0130.06719.01
5.4.400.0030.05718.70
5.4.390.0030.06018.61
5.4.380.0330.05018.48
5.4.370.0230.05018.53
5.4.360.0270.04718.68
5.4.350.0270.05318.74
5.4.340.0270.05318.51
5.4.320.0100.03512.46
5.4.310.0090.04112.46
5.4.300.0070.03712.46
5.4.290.0080.03812.46
5.4.280.0050.04012.34
5.4.270.0070.03712.34
5.4.260.0060.04012.34
5.4.250.0060.03912.34
5.4.240.0040.04512.34
5.4.230.0080.03612.34
5.4.220.0070.03612.33
5.4.210.0080.03312.33
5.4.200.0050.04312.33
5.4.190.0070.03912.33
5.4.180.0050.03712.33
5.4.170.0050.03612.34
5.4.160.0060.03712.34
5.4.150.0070.03612.34
5.4.140.0030.04012.02
5.4.130.0030.03812.01
5.4.120.0080.03311.96
5.4.110.0060.03711.96
5.4.100.0080.03311.96
5.4.90.0040.03911.96
5.4.80.0090.03411.96
5.4.70.0050.03911.96
5.4.60.0040.03611.96
5.4.50.0050.03711.95
5.4.40.0050.03911.95
5.4.30.0020.03811.94
5.4.20.0060.03611.94
5.4.10.0060.03511.95
5.4.00.0070.03811.43
5.3.290.0050.04712.80
5.3.280.0070.03812.71
5.3.270.0040.04612.73
5.3.260.0070.03812.71
5.3.250.0010.04412.72
5.3.240.0080.03612.72
5.3.230.0080.03812.71
5.3.220.0040.03912.68
5.3.210.0070.03912.68
5.3.200.0050.03812.68
5.3.190.0080.03612.68
5.3.180.0100.03912.67
5.3.170.0130.04412.66
5.3.160.0080.04912.68
5.3.150.0090.03512.67
5.3.140.0090.03612.66
5.3.130.0040.04212.66
5.3.120.0040.04112.66
5.3.110.0030.04212.66
5.3.100.0040.03912.12
5.3.90.0100.03412.08
5.3.80.0050.04312.07
5.3.70.0070.03512.07
5.3.60.0040.03912.06
5.3.50.0080.03912.00
5.3.40.0090.04712.00
5.3.30.0080.03911.95
5.3.20.0050.03711.73
5.3.10.0050.03511.69
5.3.00.0070.03511.68
5.2.170.0040.0319.18
5.2.160.0040.0309.18
5.2.150.0040.0319.18
5.2.140.0060.0309.18
5.2.130.0070.0289.14
5.2.120.0040.0329.14
5.2.110.0070.0299.15
5.2.100.0040.0299.14
5.2.90.0060.0299.14
5.2.80.0020.0349.14
5.2.70.0060.0299.14
5.2.60.0020.0349.09
5.2.50.0050.0349.06
5.2.40.0070.0389.04
5.2.30.0040.0339.02
5.2.20.0050.0349.00
5.2.10.0040.0378.92
5.2.00.0060.0298.79
5.1.60.0040.0268.07
5.1.50.0050.0248.07
5.1.40.0050.0238.06
5.1.30.0020.0288.40
5.1.20.0030.0288.43
5.1.10.0040.0318.15
5.1.00.0050.0248.15
5.0.50.0020.0226.63
5.0.40.0030.0216.49
5.0.30.0020.0376.30
5.0.20.0050.0186.27
5.0.10.0010.0226.26
5.0.00.0040.0296.25
4.4.90.0050.0154.78
4.4.80.0020.0174.75
4.4.70.0020.0194.75
4.4.60.0040.0144.75
4.4.50.0020.0164.77
4.4.40.0040.0254.71
4.4.30.0030.0154.76
4.4.20.0030.0154.84
4.4.10.0030.0154.84
4.4.00.0050.0234.76
4.3.110.0040.0164.66
4.3.100.0030.0174.66
4.3.90.0020.0154.63
4.3.80.0040.0234.58
4.3.70.0030.0144.63
4.3.60.0020.0164.63
4.3.50.0020.0164.63
4.3.40.0040.0234.54
4.3.30.0020.0163.30
4.3.20.0010.0163.29
4.3.10.0040.0143.24
4.3.00.0000.01315.60

preferences:
44.97 ms | 400 KiB | 5 Q