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://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://"; } $text = str_replace($pattern, "<a href='".(isset($start) ? $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.00418.55
8.3.50.0110.01122.11
8.3.40.0000.01419.05
8.3.30.0110.00319.23
8.3.20.0080.00020.16
8.3.10.0040.00422.05
8.3.00.0080.00022.43
8.2.180.0100.00616.50
8.2.170.0090.00622.96
8.2.160.0140.00020.77
8.2.150.0090.00024.18
8.2.140.0000.00824.66
8.2.130.0100.00326.16
8.2.120.0050.00317.75
8.2.110.0000.00922.37
8.2.100.0070.00719.70
8.2.90.0040.00419.34
8.2.80.0040.00417.97
8.2.70.0040.00417.75
8.2.60.0050.00318.05
8.2.50.0090.00018.07
8.2.40.0040.00418.16
8.2.30.0000.00718.07
8.2.20.0040.00417.76
8.2.10.0020.00517.79
8.2.00.0040.00417.85
8.1.280.0120.00325.92
8.1.270.0030.00622.01
8.1.260.0030.00726.35
8.1.250.0000.00828.09
8.1.240.0080.00023.73
8.1.230.0060.00619.10
8.1.220.0000.00817.76
8.1.210.0030.00518.77
8.1.200.0030.00717.60
8.1.190.0000.00917.40
8.1.180.0000.00818.10
8.1.170.0030.00518.81
8.1.160.0040.00422.04
8.1.150.0000.00718.80
8.1.140.0000.00717.53
8.1.130.0030.00317.84
8.1.120.0050.00517.57
8.1.110.0040.00417.63
8.1.100.0000.00717.62
8.1.90.0060.00317.48
8.1.80.0070.00017.64
8.1.70.0040.00417.48
8.1.60.0000.00917.70
8.1.50.0040.00417.57
8.1.40.0000.00917.67
8.1.30.0040.00417.77
8.1.20.0000.00817.71
8.1.10.0040.00417.63
8.1.00.0060.00317.55
8.0.300.0000.00718.77
8.0.290.0040.00417.18
8.0.280.0030.00318.39
8.0.270.0030.00317.33
8.0.260.0000.00716.97
8.0.250.0030.00317.10
8.0.240.0050.00217.14
8.0.230.0000.00717.13
8.0.220.0030.00317.00
8.0.210.0000.00717.05
8.0.200.0000.00817.00
8.0.190.0040.00416.99
8.0.180.0050.00317.12
8.0.170.0040.00416.98
8.0.160.0000.00817.11
8.0.150.0070.00016.98
8.0.140.0040.00416.92
8.0.130.0060.00013.52
8.0.120.0040.00416.99
8.0.110.0040.00417.09
8.0.100.0040.00416.92
8.0.90.0070.00016.86
8.0.80.0070.01117.11
8.0.70.0000.00717.00
8.0.60.0030.00516.87
8.0.50.0000.00816.88
8.0.30.0110.00917.28
8.0.20.0110.00817.40
8.0.10.0040.00417.08
8.0.00.0100.00916.99
7.4.330.0030.00315.00
7.4.320.0030.00316.73
7.4.300.0060.00016.69
7.4.290.0030.00316.74
7.4.280.0040.00416.73
7.4.270.0030.00316.73
7.4.260.0000.00716.71
7.4.250.0000.00716.80
7.4.240.0040.00316.78
7.4.230.0030.00316.53
7.4.220.0060.01316.77
7.4.210.0070.00816.84
7.4.200.0080.00016.92
7.4.190.0000.00716.84
7.4.160.0080.00816.77
7.4.150.0090.01017.40
7.4.140.0100.01017.86
7.4.130.0130.00616.84
7.4.120.0170.00116.56
7.4.110.0120.00616.58
7.4.100.0070.01016.59
7.4.90.0080.00816.67
7.4.80.0180.00619.39
7.4.70.0100.00716.89
7.4.60.0120.00616.65
7.4.50.0000.00716.54
7.4.40.0060.00922.77
7.4.30.0130.00316.74
7.4.00.0100.00714.86
7.3.330.0030.00313.31
7.3.320.0030.00313.38
7.3.310.0050.00216.63
7.3.300.0000.00716.48
7.3.290.0040.01116.44
7.3.280.0120.00616.48
7.3.270.0060.01317.40
7.3.260.0080.00816.66
7.3.250.0070.01116.79
7.3.240.0030.01416.86
7.3.230.0100.00716.57
7.3.210.0170.00716.82
7.3.200.0070.01319.39
7.3.190.0060.01216.43
7.3.180.0090.00616.81
7.3.170.0060.01216.51
7.3.160.0130.00316.69
7.3.120.0040.01115.03
7.2.330.0030.01416.92
7.2.320.0070.01116.89
7.2.310.0030.01417.00
7.2.300.0210.00017.01
7.2.290.0110.00616.86
7.2.60.0130.00317.17
7.2.00.0030.00619.52
7.1.200.0090.00615.72
7.1.100.0870.00016.10
7.1.70.0040.00417.33
7.1.60.0070.01119.82
7.1.50.0060.01616.93
7.1.00.0000.08022.50
7.0.200.0000.01217.09
7.0.140.0000.07322.15
7.0.60.0070.08019.91
7.0.50.0030.08317.96
7.0.40.0130.06720.02
7.0.30.0270.08720.25
7.0.20.0270.03720.17
7.0.10.0230.08720.19
7.0.00.0000.05720.15
5.6.280.0000.07721.09
5.6.210.0130.07320.75
5.6.200.0070.04318.09
5.6.190.0070.04320.45
5.6.180.3470.04020.63
5.6.170.0200.05020.61
5.6.160.0130.07720.50
5.6.150.0130.04718.11
5.6.140.0030.04018.14
5.6.130.0030.08318.18
5.6.120.0070.07021.05
5.6.110.0000.06020.98
5.6.100.0100.05321.08
5.6.90.0170.07321.01
5.6.80.0070.08320.48
5.6.70.0300.07020.37
5.5.350.0100.08020.43
5.5.340.0130.07017.91
5.5.330.0070.08720.37
5.5.320.0300.06320.22
5.5.310.0230.08020.50
5.5.300.0030.07317.98
5.5.290.0070.08017.98
5.5.280.0000.04320.80
5.5.270.0070.08320.67
5.5.260.0130.05320.64
5.5.250.0030.07020.46
5.5.240.0100.05720.27
5.4.450.0270.05019.63
5.4.440.0430.05319.13
5.4.430.0370.05019.27
5.4.420.0370.05719.63
5.4.410.0100.05718.88
5.4.400.0170.05318.71
5.4.390.0130.05018.71
5.4.380.0330.04318.56
5.4.370.0100.05718.65
5.4.360.0170.04718.65
5.4.350.0070.06018.49
5.4.340.0070.06018.55
5.4.320.0060.04412.45
5.4.310.0080.03512.45
5.4.300.0070.04612.45
5.4.290.0110.04012.45
5.4.280.0100.03212.33
5.4.270.0090.03412.34
5.4.260.0080.04112.33
5.4.250.0100.04812.33
5.4.240.0110.04012.34
5.4.230.0060.05112.32
5.4.220.0090.04712.32
5.4.210.0050.04812.32
5.4.200.0050.03812.33
5.4.190.0040.03912.32
5.4.180.0070.03512.32
5.4.170.0040.03812.34
5.4.160.0050.05112.33
5.4.150.0080.03412.32
5.4.140.0030.04712.01
5.4.130.0080.03612.00
5.4.120.0060.03611.96
5.4.110.0030.03911.95
5.4.100.0070.03611.95
5.4.90.0070.04211.96
5.4.80.0080.03911.95
5.4.70.0050.03511.95
5.4.60.0120.04211.95
5.4.50.0120.04211.95
5.4.40.0060.04811.94
5.4.30.0050.04811.93
5.4.20.0120.04511.93
5.4.10.0050.04911.93
5.4.00.0090.05011.43
5.3.290.0070.03812.80
5.3.280.0070.04312.71
5.3.270.0060.04112.73
5.3.260.0080.03712.72
5.3.250.0060.03812.72
5.3.240.0060.05212.72
5.3.230.0100.04712.70
5.3.220.0040.03912.68
5.3.210.0040.04112.68
5.3.200.0050.03812.68
5.3.190.0070.03712.68
5.3.180.0070.03412.67
5.3.170.0050.03712.67
5.3.160.0060.03712.67
5.3.150.0060.04812.67
5.3.140.0120.05112.66
5.3.130.0070.05012.66
5.3.120.0070.04012.66
5.3.110.0060.04112.66
5.3.100.0100.04012.12
5.3.90.0080.04312.08
5.3.80.0070.03912.08
5.3.70.0070.05012.08
5.3.60.0080.04112.06
5.3.50.0080.04512.00
5.3.40.0100.05512.00
5.3.30.0070.03911.94
5.3.20.0070.04711.72
5.3.10.0130.06011.68
5.3.00.0080.04811.68
5.2.170.0100.0589.17
5.2.160.0060.0409.17
5.2.150.0050.0459.17
5.2.140.0080.0419.17
5.2.130.0040.0459.13
5.2.120.0100.0329.13
5.2.110.0030.0399.13
5.2.100.0050.0399.13
5.2.90.0050.0349.13
5.2.80.0080.0359.13
5.2.70.0070.0359.13
5.2.60.0110.0469.08
5.2.50.0070.0439.05
5.2.40.0070.0379.03
5.2.30.0060.0469.02
5.2.20.0080.0309.00
5.2.10.0060.0428.92
5.2.00.0070.0408.78
5.1.60.0060.0318.07
5.1.50.0070.0328.07
5.1.40.0060.0388.05
5.1.30.0050.0408.39
5.1.20.0050.0288.42
5.1.10.0050.0338.14
5.1.00.0040.0288.15
5.0.50.0080.0226.63
5.0.40.0070.0246.49
5.0.30.0080.0296.30
5.0.20.0020.0206.28
5.0.10.0060.0216.25
5.0.00.0050.0316.24
4.4.90.0010.0184.78
4.4.80.0030.0154.75
4.4.70.0020.0174.75
4.4.60.0040.0194.76
4.4.50.0040.0174.77
4.4.40.0030.0284.71
4.4.30.0040.0154.75
4.4.20.0050.0204.84
4.4.10.0030.0224.85
4.4.00.0020.0334.76
4.3.110.0040.0224.67
4.3.100.0010.0234.66
4.3.90.0020.0224.64
4.3.80.0060.0294.58
4.3.70.0050.0194.63
4.3.60.0030.0214.63
4.3.50.0030.0224.63
4.3.40.0010.0344.54
4.3.30.0060.0183.30
4.3.20.0020.0173.28
4.3.10.0050.0163.24
4.3.00.0000.0236.38

preferences:
42.94 ms | 400 KiB | 5 Q