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)) { echo $pattern; $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='{$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.0160.00318.56
8.3.50.0130.00122.09
8.3.40.0070.00718.86
8.3.30.0100.00319.27
8.3.20.0040.00420.34
8.3.10.0080.00022.04
8.3.00.0040.00422.39
8.2.180.0120.00816.75
8.2.170.0080.00822.96
8.2.160.0140.00421.20
8.2.150.0030.00624.18
8.2.140.0080.00024.66
8.2.130.0060.00326.16
8.2.120.0000.00819.63
8.2.110.0090.00022.04
8.2.100.0060.00619.76
8.2.90.0080.00019.21
8.2.80.0040.00418.05
8.2.70.0030.00617.72
8.2.60.0060.00617.79
8.2.50.0080.00418.07
8.2.40.0040.00418.34
8.2.30.0040.00418.16
8.2.20.0080.00017.84
8.2.10.0040.00417.79
8.2.00.0040.00417.89
8.1.280.0110.00725.92
8.1.270.0030.00621.79
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0060.00323.79
8.1.230.0040.00819.09
8.1.220.0040.00417.77
8.1.210.0040.00418.77
8.1.200.0070.00317.47
8.1.190.0040.00417.53
8.1.180.0040.00418.10
8.1.170.0030.00518.62
8.1.160.0050.00222.10
8.1.150.0000.00818.90
8.1.140.0040.00417.48
8.1.130.0000.00817.92
8.1.120.0000.00717.58
8.1.110.0090.00017.52
8.1.100.0040.00417.52
8.1.90.0040.00417.56
8.1.80.0080.00017.53
8.1.70.0030.00317.59
8.1.60.0030.00617.73
8.1.50.0060.00317.61
8.1.40.0080.00017.71
8.1.30.0040.00417.70
8.1.20.0040.00417.82
8.1.10.0040.00417.75
8.1.00.0030.00517.56
8.0.300.0040.00418.77
8.0.290.0040.00417.04
8.0.280.0080.00018.47
8.0.270.0020.00517.16
8.0.260.0030.00317.02
8.0.250.0060.00317.12
8.0.240.0070.00017.12
8.0.230.0040.00417.03
8.0.220.0030.00316.95
8.0.210.0030.00317.00
8.0.200.0030.00316.99
8.0.190.0000.00717.03
8.0.180.0070.00016.96
8.0.170.0040.00417.00
8.0.160.0000.00717.05
8.0.150.0000.00917.02
8.0.140.0040.00417.07
8.0.130.0060.00013.54
8.0.120.0080.00016.88
8.0.110.0000.00717.06
8.0.100.0000.00716.86
8.0.90.0000.00717.03
8.0.80.0030.01316.96
8.0.70.0000.00716.92
8.0.60.0030.00516.98
8.0.50.0040.00416.83
8.0.30.0120.01017.20
8.0.20.0100.01017.47
8.0.10.0000.00817.16
8.0.00.0080.01316.81
7.4.330.0020.00315.00
7.4.320.0030.00316.87
7.4.300.0030.00316.82
7.4.290.0070.00016.81
7.4.280.0000.00816.77
7.4.270.0000.00716.78
7.4.260.0000.00716.85
7.4.250.0040.00416.65
7.4.240.0040.00416.74
7.4.230.0000.00716.72
7.4.220.0070.01116.60
7.4.210.0040.01116.80
7.4.200.0000.00716.81
7.4.190.0040.00416.99
7.4.160.0130.00316.64
7.4.150.0090.00917.40
7.4.140.0070.01017.86
7.4.130.0080.01316.64
7.4.120.0120.00616.71
7.4.110.0140.00316.67
7.4.100.0100.00716.80
7.4.90.0060.01216.82
7.4.80.0110.01219.39
7.4.70.0130.00416.79
7.4.60.0120.00616.61
7.4.50.0040.00016.32
7.4.40.0110.00722.77
7.4.30.0090.00616.64
7.4.00.0080.00515.30
7.3.330.0050.00013.21
7.3.320.0030.00313.20
7.3.310.0070.00016.34
7.3.300.0070.00016.50
7.3.290.0100.00316.48
7.3.280.0090.00816.49
7.3.270.0070.01017.40
7.3.260.0140.00416.56
7.3.250.0090.00816.49
7.3.240.0120.00616.79
7.3.230.0090.00916.76
7.3.210.0070.01016.83
7.3.200.0140.00419.39
7.3.190.0160.00016.73
7.3.180.0070.01016.52
7.3.170.0080.00916.75
7.3.160.0070.01016.68
7.3.120.0070.01015.00
7.3.00.0060.00616.87
7.2.330.0000.01816.72
7.2.320.0100.01316.93
7.2.310.0000.01616.88
7.2.300.0070.01016.95
7.2.290.0110.00716.94
7.2.130.0120.00317.25
7.2.120.0060.00917.24
7.2.110.0030.00617.17
7.2.100.0060.00916.83
7.2.90.0100.00617.23
7.2.80.0080.00417.05
7.2.70.0030.01117.35
7.2.60.0000.01017.34
7.2.50.0030.01517.08
7.2.40.0100.00017.10
7.2.30.0100.00717.13
7.2.20.0090.00617.33
7.2.10.0040.01117.14
7.2.00.0070.00818.46
7.1.250.0040.00915.82
7.1.240.0070.00715.72
7.1.230.0070.00415.96
7.1.220.0060.00615.96
7.1.210.0030.00616.01
7.1.200.0050.00516.19
7.1.190.0030.00616.10
7.1.180.0060.00616.18
7.1.170.0120.00315.93
7.1.160.0000.01316.16
7.1.150.0070.00715.75
7.1.140.0000.01515.96
7.1.130.0150.00015.96
7.1.120.0040.00716.11
7.1.110.0030.01016.06
7.1.100.0030.00817.17
7.1.90.0040.01115.93
7.1.80.0030.00716.06
7.1.70.0080.00316.52
7.1.60.0020.00816.63
7.1.50.0070.01216.64
7.1.40.0100.00715.96
7.1.30.0100.00316.20
7.1.20.0000.01415.99
7.1.10.0070.00715.96
7.1.00.0050.04219.31
7.0.330.0080.00615.61
7.0.320.0040.00815.34
7.0.310.0070.00715.43
7.0.300.0000.00915.75
7.0.290.0060.00615.42
7.0.280.0040.00815.41
7.0.270.0080.00815.80
7.0.260.0040.01115.71
7.0.250.0120.00315.32
7.0.240.0070.00715.73
7.0.230.0070.00715.75
7.0.220.0100.00315.57
7.0.210.0040.00815.54
7.0.200.0040.00716.37
7.0.190.0130.00315.44
7.0.180.0090.00015.74
7.0.170.0030.01015.58
7.0.160.0000.01415.46
7.0.150.0050.01015.55
7.0.140.0060.03518.85
7.0.130.0060.00615.65
7.0.120.0060.00315.91
7.0.110.0030.01015.30
7.0.100.0140.00015.52
7.0.90.0040.00715.68
7.0.80.0030.01015.71
7.0.70.0000.01315.59
7.0.60.0050.03017.74
7.0.50.0070.04516.66
7.0.40.0100.03716.90
7.0.30.0200.04316.93
7.0.20.0130.02817.02
7.0.10.0170.04216.94
7.0.00.0050.04816.87
5.6.380.0060.00614.29
5.6.370.0040.01114.58
5.6.360.0100.00614.73
5.6.350.0040.00714.58
5.6.340.0040.00714.45
5.6.330.0040.01214.93
5.6.320.0000.00914.70
5.6.310.0030.01014.70
5.6.300.0070.00714.73
5.6.290.0090.00614.64
5.6.280.0070.03517.70
5.6.270.0070.00714.21
5.6.260.0000.00914.34
5.6.250.0000.01414.55
5.6.240.0060.00914.38
5.6.230.0000.01614.46
5.6.220.0080.00814.40
5.6.210.0050.04717.54
5.6.200.0090.03516.28
5.6.190.0080.03017.26
5.6.180.1600.02417.62
5.6.170.0120.03217.48
5.6.160.0050.03017.33
5.6.150.0070.04316.29
5.6.140.0020.04616.44
5.6.130.0070.04516.42
5.6.120.0080.04317.86
5.6.110.0070.04517.83
5.6.100.0110.04217.66
5.6.90.0070.04617.77
5.6.80.0030.03517.46
5.6.70.0210.03617.40
5.6.60.0080.00314.58
5.6.50.0130.00314.34
5.6.40.0140.00014.03
5.6.30.0030.00714.73
5.6.20.0070.00314.71
5.6.10.0000.01314.55
5.6.00.0110.00414.38
5.5.380.0060.00611.13
5.5.370.0030.00611.38
5.5.360.0100.00311.20
5.5.350.0020.04415.83
5.5.340.0020.04014.48
5.5.330.0030.03415.79
5.5.320.0170.02415.65
5.5.310.0160.04115.74
5.5.300.0050.02414.67
5.5.290.0030.04514.51
5.5.280.0070.04415.94
5.5.270.0060.02016.10
5.5.260.0030.04316.01
5.5.250.0020.04515.98
5.5.240.0070.01815.69
5.5.230.0000.01111.05
5.5.220.0030.01011.04
5.5.210.0000.00811.02
5.5.200.0000.01411.34
5.5.190.0070.00411.36
5.5.180.0070.00311.39
5.5.170.0030.00711.16
5.5.160.0000.01311.00
5.5.150.0040.00411.15
5.5.140.0030.00611.00
5.5.130.0000.00911.23
5.5.120.0000.01011.28
5.5.110.0030.00511.41
5.5.100.0000.00711.13
5.5.90.0050.00511.22
5.5.80.0040.00411.05
5.5.70.0060.00311.43
5.5.60.0030.00611.17
5.5.50.0000.00811.00
5.5.40.0060.00611.00
5.5.30.0000.00911.11
5.5.20.0070.00311.29
5.5.10.0050.00511.08
5.5.00.0050.00511.25
5.4.450.0320.02815.33
5.4.440.0170.02515.25
5.4.430.0300.02215.48
5.4.420.0260.02815.11
5.4.410.0350.02915.22
5.4.400.0110.02514.86
5.4.390.0120.02314.96
5.4.380.0170.02614.77
5.4.370.0130.02514.97
5.4.360.0150.02814.86
5.4.350.0070.03614.82
5.4.340.0120.03214.87
5.4.330.0050.00311.00
5.4.320.0070.02211.88
5.4.310.0070.02011.73
5.4.300.0020.02411.85
5.4.290.0050.02111.79
5.4.280.0040.02211.73
5.4.270.0030.02211.67
5.4.260.0030.02511.81
5.4.250.0060.01911.75
5.4.240.0040.02111.77
5.4.230.0080.01811.72
5.4.220.0030.02411.77
5.4.210.0060.01811.66
5.4.200.0020.02311.82
5.4.190.0070.01711.80
5.4.180.0040.02211.84
5.4.170.0050.02011.73
5.4.160.0040.02111.78
5.4.150.0060.01911.67
5.4.140.0080.01911.51
5.4.130.0050.02011.64
5.4.120.0050.02111.49
5.4.110.0050.02211.54
5.4.100.0070.01611.48
5.4.90.0030.02311.59
5.4.80.0020.02311.49
5.4.70.0070.01811.61
5.4.60.0030.02111.48
5.4.50.0060.01911.48
5.4.40.0040.02211.62
5.4.30.0060.02111.47
5.4.20.0050.02211.47
5.4.10.0020.02611.47
5.4.00.0040.02411.31
5.3.290.0050.02211.90
5.3.280.0050.02111.86
5.3.270.0040.02211.86
5.3.260.0050.02111.86
5.3.250.0020.02311.86
5.3.240.0080.01811.86
5.3.230.0050.02011.86
5.3.220.0090.02311.84
5.3.210.0060.02111.84
5.3.200.0050.02211.84
5.3.190.0020.02311.84
5.3.180.0070.02011.84
5.3.170.0040.02311.84
5.3.160.0040.02111.84
5.3.150.0070.02111.84
5.3.140.0020.02511.83
5.3.130.0050.02611.83
5.3.120.0040.02411.83
5.3.110.0080.02611.83
5.3.100.0050.02511.56
5.3.90.0030.02411.54
5.3.80.0040.02511.54
5.3.70.0020.02311.54
5.3.60.0020.02211.54
5.3.50.0060.01811.50
5.3.40.0050.01911.50
5.3.30.0060.01811.47
5.3.20.0020.02311.36
5.3.10.0040.02211.35
5.3.00.0070.02011.34
5.2.170.0040.01710.09
5.2.160.0060.01510.09
5.2.150.0030.01810.09
5.2.140.0040.01710.09
5.2.130.0060.01510.06
5.2.120.0050.01610.07
5.2.110.0050.01710.07
5.2.100.0020.01710.07
5.2.90.0020.01910.07
5.2.80.0050.01710.07
5.2.70.0030.01810.06
5.2.60.0050.01810.04
5.2.50.0030.01710.03
5.2.40.0040.01410.02
5.2.30.0020.01910.01
5.2.20.0050.01510.00
5.2.10.0040.0169.96
5.2.00.0020.0179.89
5.1.60.0040.0169.54
5.1.50.0030.0139.54
5.1.40.0060.0129.53
5.1.30.0040.0149.70
5.1.20.0030.0159.71
5.1.10.0050.0139.57
5.1.00.0050.0169.57
5.0.50.0050.0158.82
5.0.40.0040.0148.75
5.0.30.0020.0208.65
5.0.20.0040.0158.64
5.0.10.0030.0128.63
5.0.00.0030.0178.63
4.4.90.0030.0097.89
4.4.80.0020.0087.88
4.4.70.0030.0097.88
4.4.60.0030.0097.88
4.4.50.0010.0107.88
4.4.40.0010.0167.86
4.4.30.0040.0097.88
4.4.20.0010.0117.93
4.4.10.0020.0107.93
4.4.00.0040.0167.88
4.3.110.0030.0097.84
4.3.100.0020.0107.84
4.3.90.0030.0077.82
4.3.80.0040.0137.79
4.3.70.0030.0077.82
4.3.60.0030.0087.82
4.3.50.0030.0097.81
4.3.40.0030.0127.77
4.3.30.0020.0107.15
4.3.20.0000.0127.14
4.3.10.0020.0097.12
4.3.00.0050.0118.51

preferences:
43.66 ms | 401 KiB | 5 Q