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://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)) { //$start = "https://"; } elseif(preg_match('%http://%',$pattern)) { //$start = "http://"; } else { $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.0040.01118.54
8.3.50.0110.00922.25
8.3.40.0110.00418.92
8.3.30.0070.00719.04
8.3.20.0040.00420.20
8.3.10.0000.00821.86
8.3.00.0080.00022.40
8.2.180.0150.00316.73
8.2.170.0110.00722.96
8.2.160.0120.00321.06
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0080.00019.50
8.2.110.0030.00622.37
8.2.100.0090.00319.89
8.2.90.0060.00319.39
8.2.80.0000.00818.05
8.2.70.0070.00417.75
8.2.60.0040.00417.93
8.2.50.0080.00018.07
8.2.40.0030.00518.16
8.2.30.0050.00518.16
8.2.20.0030.00517.89
8.2.10.0090.00019.60
8.2.00.0070.00017.90
8.1.280.0040.01125.92
8.1.270.0030.00622.15
8.1.260.0100.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.82
8.1.230.0100.00319.17
8.1.220.0000.00817.74
8.1.210.0090.00018.77
8.1.200.0040.00417.38
8.1.190.0040.00417.53
8.1.180.0000.00818.10
8.1.170.0040.00418.83
8.1.160.0040.00422.04
8.1.150.0030.00518.80
8.1.140.0020.00517.52
8.1.130.0000.00717.86
8.1.120.0050.00217.66
8.1.110.0040.00417.52
8.1.100.0040.00417.67
8.1.90.0000.00817.56
8.1.80.0040.00417.69
8.1.70.0030.00317.52
8.1.60.0030.00517.75
8.1.50.0030.00517.68
8.1.40.0000.01017.69
8.1.30.0040.00417.70
8.1.20.0040.00417.82
8.1.10.0040.00417.69
8.1.00.0040.00417.55
8.0.300.0000.00818.77
8.0.290.0000.00817.18
8.0.280.0000.00718.48
8.0.270.0000.00717.23
8.0.260.0000.00616.89
8.0.250.0030.00317.09
8.0.240.0030.00716.98
8.0.230.0000.00716.98
8.0.220.0030.00317.09
8.0.210.0000.00716.93
8.0.200.0040.00417.07
8.0.190.0040.00417.11
8.0.180.0040.00417.13
8.0.170.0000.00816.95
8.0.160.0040.00417.05
8.0.150.0040.00417.10
8.0.140.0040.00417.01
8.0.130.0060.00013.54
8.0.120.0000.00816.90
8.0.110.0030.00517.01
8.0.100.0040.00416.91
8.0.90.0060.00317.07
8.0.80.0000.01617.07
8.0.70.0070.00017.00
8.0.60.0070.00016.85
8.0.50.0050.00316.95
8.0.30.0070.01217.24
8.0.20.0090.01017.40
8.0.10.0030.00517.06
8.0.00.0040.01416.86
7.4.330.0000.00615.11
7.4.320.0030.00316.83
7.4.300.0000.00616.69
7.4.290.0040.00416.75
7.4.280.0000.00716.77
7.4.270.0060.00316.84
7.4.260.0070.00016.82
7.4.250.0050.00316.77
7.4.240.0030.00416.81
7.4.230.0030.00316.63
7.4.220.0030.01616.92
7.4.210.0080.00916.86
7.4.200.0000.00716.92
7.4.190.0050.00516.74
7.4.160.0110.01116.96
7.4.150.0060.01317.40
7.4.140.0120.00717.86
7.4.130.0070.01116.67
7.4.120.0080.01016.76
7.4.110.0110.01116.67
7.4.100.0130.00716.79
7.4.90.0040.01316.61
7.4.80.0000.01919.39
7.4.70.0080.00816.84
7.4.60.0060.01216.65
7.4.50.0040.00416.69
7.4.40.0090.00622.77
7.4.30.0030.01316.68
7.4.00.0030.01314.97
7.3.330.0030.00313.22
7.3.320.0000.00513.41
7.3.310.0030.00316.31
7.3.300.0000.00716.50
7.3.290.0110.00316.53
7.3.280.0060.01116.47
7.3.270.0060.01117.40
7.3.260.0070.01116.79
7.3.250.0120.00616.61
7.3.240.0110.00716.52
7.3.230.0070.01016.50
7.3.210.0140.00516.54
7.3.200.0170.00719.39
7.3.190.0110.00616.46
7.3.180.0120.00316.93
7.3.170.0120.00916.55
7.3.160.0030.01316.50
7.3.120.0080.00915.12
7.3.110.0040.01514.99
7.3.100.0110.00314.78
7.3.90.0040.01115.04
7.3.80.0090.00615.03
7.3.70.0040.01215.19
7.3.60.0030.01015.09
7.3.50.0060.00914.85
7.3.40.0110.00314.81
7.3.30.0070.00715.02
7.3.20.0030.01217.05
7.3.10.0030.01016.87
7.3.00.0090.00916.70
7.2.330.0060.01217.01
7.2.320.0030.01816.97
7.2.310.0070.01016.90
7.2.300.0140.00316.94
7.2.290.0060.01017.00
7.2.250.0070.01015.32
7.2.240.0060.01315.53
7.2.230.0060.00615.04
7.2.220.0070.00715.04
7.2.210.0030.01415.25
7.2.200.0030.01015.31
7.2.190.0060.00915.48
7.2.180.0030.00915.27
7.2.170.0070.00315.29
7.2.00.0030.00919.55
7.1.330.0030.01316.18
7.1.320.0070.00716.07
7.1.310.0060.00915.75
7.1.300.0000.01615.92
7.1.290.0000.01015.95
7.1.280.0080.00415.94
7.1.270.0080.00515.95
7.1.260.0030.00615.75
7.1.100.0030.01018.00
7.1.70.0000.00817.34
7.1.60.0070.01119.82
7.1.50.0030.00716.84
7.1.00.0100.06722.57
7.0.200.0040.00416.58
7.0.140.0000.07022.15
7.0.60.0070.07720.03
7.0.50.0070.06317.91
7.0.40.0100.08720.06
7.0.30.0200.04719.99
7.0.20.0230.04720.35
7.0.10.0270.04320.02
7.0.00.0130.03020.14
5.6.280.0070.08720.90
5.6.210.0030.04320.72
5.6.200.0030.05018.21
5.6.190.0000.04720.41
5.6.180.4030.04720.61
5.6.170.0330.08020.50
5.6.160.0000.04320.50
5.6.150.0100.07318.21
5.6.140.0000.08318.09
5.6.130.0070.08718.18
5.6.120.0170.04320.96
5.6.110.0070.07320.98
5.6.100.0170.07320.96
5.6.90.0100.08320.88
5.6.80.0130.07720.51
5.6.70.0230.03020.37
5.5.350.0100.07720.32
5.5.340.0230.06017.95
5.5.330.0070.03720.29
5.5.320.0270.08020.24
5.5.310.0230.04020.20
5.5.300.0200.06717.89
5.5.290.0000.09317.94
5.5.280.0130.07720.65
5.5.270.0100.08020.89
5.5.260.0070.07720.79
5.5.250.0070.03720.69
5.5.240.0170.07020.25
5.4.450.0230.05719.37
5.4.440.0430.05719.05
5.4.430.0230.05319.55
5.4.420.0100.05319.04
5.4.410.0270.04718.96
5.4.400.0070.05718.73
5.4.390.0100.05018.71
5.4.380.0330.04718.56
5.4.370.0230.04718.43
5.4.360.0100.05318.70
5.4.350.0130.05318.68
5.4.340.0130.05318.52
5.4.320.0080.03512.46
5.4.310.0040.04212.45
5.4.300.0050.04112.46
5.4.290.0060.03812.45
5.4.280.0060.03712.33
5.4.270.0070.03712.34
5.4.260.0070.04112.34
5.4.250.0100.03312.34
5.4.240.0090.03412.34
5.4.230.0050.04112.33
5.4.220.0060.04312.33
5.4.210.0030.04212.33
5.4.200.0070.03712.32
5.4.190.0050.03912.32
5.4.180.0050.04012.32
5.4.170.0060.03612.34
5.4.160.0070.03612.33
5.4.150.0090.04512.33
5.4.140.0060.03812.01
5.4.130.0070.04112.00
5.4.120.0130.04311.95
5.4.110.0070.04811.95
5.4.100.0080.04211.95
5.4.90.0060.04811.95
5.4.80.0110.04211.95
5.4.70.0130.05011.95
5.4.60.0060.05311.95
5.4.50.0020.04311.95
5.4.40.0040.04811.93
5.4.30.0040.04411.93
5.4.20.0070.04811.94
5.4.10.0090.04311.93
5.4.00.0050.04111.43
5.3.290.0050.04012.80
5.3.280.0060.04112.71
5.3.270.0060.04012.73
5.3.260.0030.04312.72
5.3.250.0070.03812.72
5.3.240.0080.04212.72
5.3.230.0050.04512.71
5.3.220.0060.03812.68
5.3.210.0090.03812.68
5.3.200.0060.03812.68
5.3.190.0040.04112.68
5.3.180.0020.04112.67
5.3.170.0040.04012.67
5.3.160.0070.03612.68
5.3.150.0070.03712.68
5.3.140.0040.03812.66
5.3.130.0080.03912.66
5.3.120.0070.04012.66
5.3.110.0090.04112.66
5.3.100.0030.04212.12
5.3.90.0050.04112.08
5.3.80.0060.03912.07
5.3.70.0050.03812.07
5.3.60.0070.03712.07
5.3.50.0060.03812.00
5.3.40.0060.03812.00
5.3.30.0060.04711.94
5.3.20.0070.04911.72
5.3.10.0120.03911.68
5.3.00.0040.04211.67
5.2.170.0050.0319.17
5.2.160.0010.0349.17
5.2.150.0060.0309.17
5.2.140.0030.0369.17
5.2.130.0050.0299.13
5.2.120.0040.0299.13
5.2.110.0040.0319.13
5.2.100.0080.0269.14
5.2.90.0050.0299.13
5.2.80.0010.0359.13
5.2.70.0050.0329.13
5.2.60.0030.0329.07
5.2.50.0070.0279.05
5.2.40.0040.0309.02
5.2.30.0030.0319.01
5.2.20.0030.0319.00
5.2.10.0050.0378.92
5.2.00.0030.0418.78
5.1.60.0060.0308.07
5.1.50.0040.0308.07
5.1.40.0070.0248.04
5.1.30.0060.0288.39
5.1.20.0080.0328.42
5.1.10.0030.0298.14
5.1.00.0020.0288.15
5.0.50.0030.0216.63
5.0.40.0060.0256.49
5.0.30.0030.0346.30
5.0.20.0080.0236.27
5.0.10.0100.0266.25
5.0.00.0050.0396.24
4.4.90.0040.0174.78
4.4.80.0040.0154.75
4.4.70.0040.0154.75
4.4.60.0010.0174.75
4.4.50.0020.0164.77
4.4.40.0040.0244.71
4.4.30.0020.0164.76
4.4.20.0000.0194.85
4.4.10.0030.0154.85
4.4.00.0030.0254.76
4.3.110.0020.0174.67
4.3.100.0010.0164.67
4.3.90.0040.0134.63
4.3.80.0020.0254.58
4.3.70.0030.0174.63
4.3.60.0020.0174.63
4.3.50.0030.0154.63
4.3.40.0030.0234.53
4.3.30.0040.0143.30
4.3.20.0040.0193.28
4.3.10.0030.0153.24
4.3.00.0030.0234.53

preferences:
39.88 ms | 401 KiB | 5 Q