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.40.0120.00318.92
8.3.30.0070.00719.22
8.3.20.0050.00320.38
8.3.10.0080.00022.14
8.3.00.0080.00022.38
8.2.170.0150.00622.96
8.2.160.0070.01021.02
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0090.00017.75
8.2.110.0000.01022.33
8.2.100.0070.00418.03
8.2.90.0050.00318.16
8.2.80.0090.00218.00
8.2.70.0070.00418.00
8.2.60.0000.00818.05
8.2.50.0060.00318.07
8.2.40.0000.00818.16
8.2.30.0000.00818.09
8.2.20.0000.00817.85
8.2.10.0050.00319.79
8.2.00.0040.00418.03
8.1.270.0060.00922.12
8.1.260.0060.00326.35
8.1.250.0150.00428.09
8.1.240.0060.00320.68
8.1.230.0070.00420.97
8.1.220.0040.00417.74
8.1.210.0000.00918.81
8.1.200.0030.00617.60
8.1.190.0050.00317.41
8.1.180.0030.00618.10
8.1.170.0000.00818.67
8.1.160.0050.00221.92
8.1.150.0040.00418.85
8.1.140.0000.00817.48
8.1.130.0070.00017.89
8.1.120.0060.00317.60
8.1.110.0040.00417.63
8.1.100.0000.00717.51
8.1.90.0070.00017.59
8.1.80.0000.00817.64
8.1.70.0000.00717.55
8.1.60.0040.00417.71
8.1.50.0000.00817.69
8.1.40.0050.00317.66
8.1.30.0030.00517.65
8.1.20.0000.00817.71
8.1.10.0040.00417.67
8.1.00.0040.00417.76
8.0.300.0040.00420.03
8.0.290.0000.00717.16
8.0.280.0030.00318.53
8.0.270.0040.00417.30
8.0.260.0080.00017.04
8.0.250.0000.00717.22
8.0.240.0070.00317.18
8.0.230.0020.00517.14
8.0.220.0040.00417.00
8.0.210.0000.00717.01
8.0.200.0000.00817.04
8.0.190.0040.00417.09
8.0.180.0000.00717.13
8.0.170.0000.00917.11
8.0.160.0040.00417.18
8.0.150.0040.00417.03
8.0.140.0000.00717.10
8.0.130.0030.00313.50
8.0.120.0040.00417.13
8.0.110.0050.00317.12
8.0.100.0050.00317.13
8.0.90.0030.00617.00
8.0.80.0090.00917.05
8.0.70.0050.00217.18
8.0.60.0080.00016.90
8.0.50.0050.00217.17
8.0.30.0090.01017.13
8.0.20.0110.00817.40
8.0.10.0000.00717.25
8.0.00.0070.01216.86
7.4.330.0030.00315.11
7.4.320.0040.00416.61
7.4.300.0060.00016.88
7.4.290.0030.00316.81
7.4.280.0040.00416.72
7.4.270.0080.00016.73
7.4.260.0000.00816.85
7.4.250.0030.00516.79
7.4.240.0040.00416.68
7.4.230.0040.00416.63
7.4.220.0000.01816.66
7.4.210.0090.00616.83
7.4.200.0040.00416.89
7.4.190.0070.00016.91
7.4.160.0150.00316.72
7.4.150.0120.01217.40
7.4.140.0100.00717.86
7.4.130.0100.00716.68
7.4.120.0100.00816.77
7.4.110.0070.01016.79
7.4.100.0080.00816.72
7.4.90.0100.00716.65
7.4.80.0150.00919.39
7.4.70.0070.01016.69
7.4.60.0090.00616.61
7.4.50.0030.00616.84
7.4.40.0060.00622.77
7.4.30.0150.00616.74
7.4.00.0030.00915.26
7.3.330.0060.00313.44
7.3.320.0030.00313.39
7.3.310.0030.00316.68
7.3.300.0030.00316.40
7.3.290.0040.01116.58
7.3.280.0080.01016.57
7.3.270.0000.01617.40
7.3.260.0130.01016.88
7.3.250.0060.01216.58
7.3.240.0120.00816.57
7.3.230.0130.01016.66
7.3.210.0090.00916.45
7.3.200.0070.01319.39
7.3.190.0030.01416.63
7.3.180.0090.00616.59
7.3.170.0110.00616.73
7.3.160.0040.01116.70
7.3.120.0000.01615.10
7.2.330.0090.00916.83
7.2.320.0170.00717.01
7.2.310.0120.00916.92
7.2.300.0030.01716.67
7.2.290.0040.01816.77
7.1.70.0030.00317.49
7.1.60.0040.01819.82
7.1.50.0040.01417.07
7.1.00.0100.07022.38
7.0.200.0040.00817.02
7.0.140.0170.06022.15
7.0.60.0000.09019.96
7.0.50.0000.04717.86
7.0.40.0100.05020.09
7.0.30.0330.06720.11
7.0.20.0270.05320.06
7.0.10.0000.04720.20
7.0.00.0170.06020.14
5.6.280.0030.07021.00
5.6.210.0070.06020.50
5.6.200.0130.07018.16
5.6.190.0070.04020.61
5.6.180.0470.05320.67
5.6.170.0370.07720.33
5.6.160.0030.05320.47
5.6.150.0000.04318.15
5.6.140.0000.08318.11
5.6.130.0070.03718.11
5.6.120.0070.05721.00
5.6.110.0100.06021.04
5.6.100.0030.09020.97
5.6.90.0130.07721.00
5.6.80.0030.04020.42
5.5.350.0170.08720.43
5.5.340.0070.08017.95
5.5.330.0100.07720.12
5.5.320.0400.06020.29
5.5.310.0130.05020.32
5.5.300.0170.07017.89
5.5.290.0100.08717.96
5.5.280.0170.04320.80
5.5.270.0130.06720.75
5.5.260.0000.09320.86
5.5.250.0030.06020.57
5.5.240.0000.04320.19
5.4.450.0730.05719.60
5.4.440.0730.05019.60
5.4.430.0170.04719.51
5.4.420.0100.05319.46
5.4.410.0100.05718.99
5.4.400.0070.05718.49
5.4.390.0270.05318.53
5.4.380.0130.05318.52
5.4.370.0100.05318.70
5.4.360.0100.05318.66
5.4.350.0130.05318.54
5.4.340.0100.05718.70
5.4.320.0070.04012.45
5.4.310.0050.04312.45
5.4.300.0060.05412.46
5.4.290.0080.03612.45
5.4.280.0070.03412.34
5.4.270.0100.03412.34
5.4.260.0050.04012.34
5.4.250.0050.03912.34
5.4.240.0050.03812.34
5.4.230.0070.04112.33
5.4.220.0100.04312.33
5.4.210.0060.04912.33
5.4.200.0070.05112.33
5.4.190.0050.03912.33
5.4.180.0070.03712.32
5.4.170.0090.03512.34
5.4.160.0080.03612.33
5.4.150.0060.03812.33
5.4.140.0080.03712.01
5.4.130.0140.04012.00
5.4.120.0110.04511.96
5.4.110.0080.04811.96
5.4.100.0130.04111.95
5.4.90.0110.04611.95
5.4.80.0110.04711.95
5.4.70.0090.04611.95
5.4.60.0090.04711.95
5.4.50.0080.04911.95
5.4.40.0070.05011.94
5.4.30.0070.04711.94
5.4.20.0050.03711.93
5.4.10.0050.04311.94
5.4.00.0070.03611.43
5.3.290.0060.04012.80
5.3.280.0110.03412.71
5.3.270.0070.04012.72
5.3.260.0070.03812.72
5.3.250.0080.03812.72
5.3.240.0070.04912.72
5.3.230.0080.03612.71
5.3.220.0060.04212.68
5.3.210.0090.03612.68
5.3.200.0090.03912.68
5.3.190.0070.04312.68
5.3.180.0070.04012.67
5.3.170.0050.04212.67
5.3.160.0050.04112.68
5.3.150.0060.04512.67
5.3.140.0070.03612.66
5.3.130.0060.04112.66
5.3.120.0080.04412.65
5.3.110.0080.04312.66
5.3.100.0050.04112.12
5.3.90.0070.04212.09
5.3.80.0070.04412.07
5.3.70.0040.04012.08
5.3.60.0060.04012.06
5.3.50.0060.04012.00
5.3.40.0090.04112.00
5.3.30.0070.04811.94
5.3.20.0070.04611.73
5.3.10.0080.04711.68
5.3.00.0110.04211.67
5.2.170.0050.0359.17
5.2.160.0080.0399.17
5.2.150.0090.0389.17
5.2.140.0060.0429.16
5.2.130.0050.0419.13
5.2.120.0060.0399.13
5.2.110.0110.0289.13
5.2.100.0020.0339.13
5.2.90.0050.0319.13
5.2.80.0030.0339.13
5.2.70.0030.0369.13
5.2.60.0060.0409.07
5.2.50.0060.0329.05
5.2.40.0060.0299.03
5.2.30.0050.0309.02
5.2.20.0050.0299.00
5.2.10.0090.0248.91
5.2.00.0040.0298.78
5.1.60.0040.0298.07
5.1.50.0080.0298.07
5.1.40.0050.0338.04
5.1.30.0060.0318.39
5.1.20.0020.0298.42
5.1.10.0070.0238.14
5.1.00.0000.0328.14
5.0.50.0030.0216.63
5.0.40.0040.0196.49
5.0.30.0050.0306.30
5.0.20.0060.0196.27
5.0.10.0060.0246.25
5.0.00.0020.0366.24
4.4.90.0020.0174.78
4.4.80.0030.0164.75
4.4.70.0040.0144.76
4.4.60.0020.0164.75
4.4.50.0030.0154.77
4.4.40.0050.0264.71
4.4.30.0040.0214.76
4.4.20.0020.0174.84
4.4.10.0030.0154.85
4.4.00.0030.0264.76
4.3.110.0040.0174.67
4.3.100.0010.0194.66
4.3.90.0040.0134.63
4.3.80.0050.0224.58
4.3.70.0040.0204.63
4.3.60.0060.0184.63
4.3.50.0040.0224.63
4.3.40.0010.0274.54
4.3.30.0020.0163.30
4.3.20.0030.0153.29
4.3.10.0010.0173.24
4.3.00.0130.0236.61

preferences:
44.67 ms | 400 KiB | 5 Q