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) && !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.0120.00918.28
8.3.50.0230.00722.10
8.3.40.0110.00719.04
8.3.30.0090.00619.04
8.3.20.0040.00420.16
8.3.10.0040.00422.04
8.3.00.0080.00022.49
8.2.180.0100.01016.75
8.2.170.0000.01522.96
8.2.160.0140.00021.10
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0080.00019.84
8.2.110.0000.01022.13
8.2.100.0040.00819.82
8.2.90.0000.00819.41
8.2.80.0040.00419.71
8.2.70.0000.00817.75
8.2.60.0080.00017.93
8.2.50.0040.00418.07
8.2.40.0080.00418.22
8.2.30.0040.00418.23
8.2.20.0080.00017.76
8.2.10.0040.00419.56
8.2.00.0070.00017.78
8.1.280.0150.00025.92
8.1.270.0050.00322.19
8.1.260.0070.00326.35
8.1.250.0040.00428.09
8.1.240.0090.00023.79
8.1.230.0080.00419.15
8.1.220.0050.00317.76
8.1.210.0050.00318.77
8.1.200.0030.00717.47
8.1.190.0040.00417.51
8.1.180.0030.00518.10
8.1.170.0040.00418.77
8.1.160.0040.00422.04
8.1.150.0050.00318.81
8.1.140.0040.00417.65
8.1.130.0040.00417.77
8.1.120.0040.00417.62
8.1.110.0040.00417.64
8.1.100.0000.00717.62
8.1.90.0040.00417.52
8.1.80.0070.00017.54
8.1.70.0000.00817.56
8.1.60.0030.00617.71
8.1.50.0000.00817.63
8.1.40.0000.00817.74
8.1.30.0050.00317.63
8.1.20.0030.00517.79
8.1.10.0050.00217.77
8.1.00.0050.00317.68
8.0.300.0000.00818.77
8.0.290.0000.00717.05
8.0.280.0070.00018.50
8.0.270.0040.00317.24
8.0.260.0030.00318.44
8.0.250.0030.00317.03
8.0.240.0070.00317.07
8.0.230.0000.00817.02
8.0.220.0040.00417.04
8.0.210.0070.00017.00
8.0.200.0030.00617.13
8.0.190.0040.00417.00
8.0.180.0000.00717.01
8.0.170.0000.00817.08
8.0.160.0030.00617.05
8.0.150.0030.01016.96
8.0.140.0000.00717.03
8.0.130.0000.00613.49
8.0.120.0040.00417.00
8.0.110.0050.00317.03
8.0.100.0000.00716.92
8.0.90.0000.00816.95
8.0.80.0030.01217.02
8.0.70.0050.00317.00
8.0.60.0000.00716.91
8.0.50.0030.00516.98
8.0.30.0140.01017.13
8.0.20.0120.01017.40
8.0.10.0000.00817.04
8.0.00.0100.00716.80
7.4.330.0050.00015.16
7.4.320.0060.00016.74
7.4.300.0040.00516.63
7.4.290.0030.00316.73
7.4.280.0000.00716.81
7.4.270.0040.00416.63
7.4.260.0070.00416.73
7.4.250.0060.00316.82
7.4.240.0050.00316.79
7.4.230.0000.00716.91
7.4.220.0030.01516.79
7.4.210.0090.00816.81
7.4.200.0050.00216.93
7.4.190.0030.00616.87
7.4.160.0040.01316.81
7.4.150.0140.01117.40
7.4.140.0050.01517.86
7.4.130.0130.00616.67
7.4.120.0100.00816.73
7.4.110.0070.01016.67
7.4.100.0100.00716.57
7.4.90.0180.00016.76
7.4.80.0090.01419.39
7.4.70.0100.00716.47
7.4.60.0120.00816.78
7.4.50.0040.00416.74
7.4.40.0070.01022.77
7.4.30.0060.01416.68
7.4.10.0120.00614.91
7.4.00.0070.01015.19
7.3.330.0060.00013.27
7.3.320.0030.00313.32
7.3.310.0030.00516.44
7.3.300.0050.00216.32
7.3.290.0060.00916.60
7.3.280.0050.01116.47
7.3.270.0060.01117.40
7.3.260.0120.00616.52
7.3.250.0080.01216.76
7.3.240.0120.00416.77
7.3.230.0070.01316.39
7.3.210.0070.01116.67
7.3.200.0130.00419.39
7.3.190.0100.00716.55
7.3.180.0090.00616.49
7.3.170.0150.00916.48
7.3.160.0080.00916.82
7.3.130.0110.00714.98
7.3.120.0100.00615.11
7.3.110.0060.01115.08
7.3.100.0030.01014.87
7.3.90.0070.00714.93
7.3.80.0070.00515.02
7.3.70.0090.00615.02
7.3.60.0080.00514.99
7.3.50.0030.01015.09
7.3.40.0050.00714.96
7.3.30.0090.00315.05
7.3.20.0020.01016.67
7.3.10.0080.00716.77
7.3.00.0070.00916.88
7.2.330.0070.01016.86
7.2.320.0060.01616.93
7.2.310.0140.01017.06
7.2.300.0100.00716.85
7.2.290.0090.00916.79
7.2.260.0050.01315.31
7.2.250.0020.01615.01
7.2.240.0030.01215.33
7.2.230.0020.01615.30
7.2.220.0110.00615.40
7.2.210.0070.00515.20
7.2.200.0050.00715.35
7.2.190.0020.01415.29
7.2.180.0050.00915.36
7.2.170.0050.01215.15
7.2.160.0060.00715.26
7.2.150.0050.00717.25
7.2.140.0110.00517.12
7.2.130.0070.00717.29
7.2.120.0110.00417.03
7.2.110.0090.00417.12
7.2.100.0080.00817.03
7.2.90.0080.00517.15
7.2.80.0090.00717.22
7.2.70.0070.00717.24
7.2.60.0070.01017.20
7.2.50.0030.01316.99
7.2.40.0110.00717.11
7.2.30.0090.00417.13
7.2.20.0040.00717.11
7.2.10.0060.00917.13
7.2.00.0050.01017.69
7.1.330.0090.00515.92
7.1.320.0030.01016.22
7.1.310.0000.01116.24
7.1.300.0020.01116.16
7.1.290.0020.01115.87
7.1.280.0040.00915.98
7.1.270.0050.01015.99
7.1.260.0060.00716.13
7.1.250.0020.01115.94
7.1.240.0070.00615.98
7.1.230.0060.00715.99
7.1.220.0020.01116.01
7.1.210.0080.00516.05
7.1.200.0050.00815.95
7.1.190.0060.00716.03
7.1.180.0080.00815.94
7.1.170.0040.00815.88
7.1.160.0060.00615.94
7.1.150.0060.00715.98
7.1.140.0060.00816.12
7.1.130.0090.00516.06
7.1.120.0060.00615.93
7.1.110.0040.00716.09
7.1.100.0070.00516.49
7.1.90.0060.00916.02
7.1.80.0080.00816.01
7.1.70.0060.00716.32
7.1.60.0080.01016.86
7.1.50.0080.00916.25
7.1.40.0050.01016.03
7.1.30.0060.00915.98
7.1.20.0100.00516.02
7.1.10.0060.00916.01
7.1.00.0060.02517.48
7.0.330.0050.00815.62
7.0.320.0060.00715.54
7.0.310.0060.00915.60
7.0.300.0060.01015.71
7.0.290.0050.00515.59
7.0.280.0060.01015.41
7.0.270.0060.00615.61
7.0.260.0050.00815.55
7.0.250.0090.00215.59
7.0.240.0040.00815.55
7.0.230.0070.00615.64
7.0.220.0050.00515.53
7.0.210.0060.00815.66
7.0.200.0040.00916.02
7.0.190.0040.01015.60
7.0.180.0070.00815.52
7.0.170.0060.00815.58
7.0.160.0100.00415.64
7.0.150.0070.00815.58
7.0.140.0100.02117.17
7.0.130.0090.00315.44
7.0.120.0050.00815.50
7.0.110.0060.00715.66
7.0.100.0090.00415.56
7.0.90.0110.00315.69
7.0.80.0060.01015.64
7.0.70.0060.00615.50
7.0.60.0100.02416.71
7.0.50.0060.02716.11
7.0.40.0080.02415.21
7.0.30.0120.02515.26
7.0.20.0130.02215.33
7.0.10.0130.02115.29
7.0.00.0070.02515.27
5.6.400.0060.00514.54
5.6.390.0070.00414.83
5.6.380.0040.00714.78
5.6.370.0020.01114.47
5.6.360.0050.00614.73
5.6.350.0040.00714.51
5.6.340.0060.00914.65
5.6.330.0060.00514.33
5.6.320.0070.00514.55
5.6.310.0080.00514.38
5.6.300.0040.00914.43
5.6.290.0050.00714.24
5.6.280.0050.02416.02
5.6.270.0090.01014.55
5.6.260.0090.00514.45
5.6.250.0080.00914.39
5.6.240.0110.00414.62
5.6.230.0080.00714.62
5.6.220.0060.00714.51
5.6.210.0050.02116.03
5.6.200.0050.02615.27
5.6.190.0060.02716.03
5.6.180.0960.01515.95
5.6.170.0140.02415.93
5.6.160.0070.01716.06
5.6.150.0080.01715.29
5.6.140.0050.02915.41
5.6.130.0090.02515.40
5.6.120.0100.02216.10
5.6.110.0040.03016.07
5.6.100.0080.02415.96
5.6.90.0070.02916.12
5.6.80.0070.02416.00
5.6.70.0130.02515.85
5.6.60.0050.00814.52
5.6.50.0010.00814.25
5.6.40.0070.00714.28
5.6.30.0080.00914.28
5.6.20.0090.00814.35
5.6.10.0060.01114.51
5.6.00.0080.00514.45
5.5.380.0080.00713.25
5.5.370.0090.00513.47
5.5.360.0070.00613.58
5.5.350.0080.02315.21
5.5.340.0060.02714.57
5.5.330.0070.02615.15
5.5.320.0100.02415.13
5.5.310.0120.02915.11
5.5.300.0100.02314.57
5.5.290.0080.01914.50
5.5.280.0070.02915.41
5.5.270.0070.01915.19
5.5.260.0040.01815.24
5.5.250.0060.01615.17
5.5.240.0060.01915.07
5.5.230.0050.00813.23
5.5.220.0050.00813.28
5.5.210.0040.00713.21
5.5.200.0070.00613.18
5.5.190.0070.00413.42
5.5.180.0030.01013.46
5.5.170.0090.00513.07
5.5.160.0100.00413.34
5.5.150.0080.00813.35
5.5.140.0060.00713.40
5.5.130.0070.00513.44
5.5.120.0100.00313.32
5.5.110.0060.00513.24
5.5.100.0060.00613.45
5.5.90.0060.00513.45
5.5.80.0080.00813.34
5.5.70.0040.00913.26
5.5.60.0060.00913.22
5.5.50.0060.00613.37
5.5.40.0050.00913.46
5.5.30.0050.00813.38
5.5.20.0020.01313.39
5.5.10.0070.00313.19
5.5.00.0040.00713.41
5.4.450.0280.01813.33
5.4.440.0140.01513.27
5.4.430.0230.01713.26
5.4.420.0220.01413.28
5.4.410.0070.01813.15
5.4.400.0090.01513.00
5.4.390.0050.01813.06
5.4.380.0090.01613.13
5.4.370.0100.02013.05
5.4.360.0110.01813.09
5.4.350.0070.01913.14
5.4.340.0130.01913.13
5.4.330.0040.00711.14
5.4.320.0030.01611.49
5.4.310.0060.01511.47
5.4.300.0050.01411.59
5.4.290.0090.01311.38
5.4.280.0030.01511.41
5.4.270.0050.01611.48
5.4.260.0030.01611.42
5.4.250.0050.01411.48
5.4.240.0040.01311.41
5.4.230.0060.01611.48
5.4.220.0040.01711.36
5.4.210.0080.01211.47
5.4.200.0070.01411.32
5.4.190.0050.01411.40
5.4.180.0050.01611.52
5.4.170.0040.02011.43
5.4.160.0070.01511.38
5.4.150.0060.01611.42
5.4.140.0030.01711.29
5.4.130.0060.01411.40
5.4.120.0060.01111.42
5.4.110.0050.01411.33
5.4.100.0040.01511.42
5.4.90.0050.01311.45
5.4.80.0070.01411.23
5.4.70.0060.01511.46
5.4.60.0030.01511.40
5.4.50.0070.01211.33
5.4.40.0070.01411.30
5.4.30.0070.01611.35
5.4.20.0060.01611.35
5.4.10.0040.01711.26
5.4.00.0070.01611.30
5.3.290.0060.01311.39
5.3.280.0050.01611.23
5.3.270.0060.01511.25
5.3.260.0050.01811.32
5.3.250.0050.01911.30
5.3.240.0070.01711.28
5.3.230.0050.01811.27
5.3.220.0040.02011.31
5.3.210.0040.01911.26
5.3.200.0070.01611.31
5.3.190.0040.01411.30
5.3.180.0030.01611.30
5.3.170.0070.01411.33
5.3.160.0050.01411.25
5.3.150.0070.01311.23
5.3.140.0070.01211.37
5.3.130.0070.01111.30
5.3.120.0040.01411.23
5.3.110.0040.01411.28
5.3.100.0060.01211.20
5.3.90.0040.01411.06
5.3.80.0090.00911.09
5.3.70.0050.01411.05
5.3.60.0040.01511.16
5.3.50.0020.01610.97
5.3.40.0030.01411.02
5.3.30.0060.01211.04
5.3.20.0040.01711.01
5.3.10.0060.01310.90
5.3.00.0070.01510.86
5.2.170.0050.0209.31
5.2.160.0050.0179.21
5.2.150.0010.0239.24
5.2.140.0050.0149.28
5.2.130.0030.0199.22
5.2.120.0080.0139.29
5.2.110.0040.0199.25
5.2.100.0070.0169.31
5.2.90.0040.0189.27
5.2.80.0030.0199.26
5.2.70.0050.0199.18
5.2.60.0060.0179.11
5.2.50.0040.0209.05
5.2.40.0020.0189.20
5.2.30.0030.0209.18
5.2.20.0040.0219.13
5.2.10.0080.0199.06
5.2.00.0070.0198.91
5.1.60.0050.0158.47
5.1.50.0040.0138.48
5.1.40.0040.0188.46
5.1.30.0040.0148.64
5.1.20.0030.0168.65
5.1.10.0030.0158.51
5.1.00.0040.0148.51
5.0.50.0050.0097.75
5.0.40.0020.0137.69
5.0.30.0020.0227.59
5.0.20.0040.0137.58
5.0.10.0040.0127.57
5.0.00.0040.0177.56
4.4.90.0010.0126.83
4.4.80.0050.0116.82
4.4.70.0040.0116.82
4.4.60.0020.0126.82
4.4.50.0030.0136.83
4.4.40.0030.0196.79
4.4.30.0040.0176.82
4.4.20.0010.0126.86
4.4.10.0030.0096.87
4.4.00.0020.0156.82
4.3.110.0030.0116.78
4.3.100.0030.0116.78
4.3.90.0040.0116.76
4.3.80.0040.0176.73
4.3.70.0040.0126.76
4.3.60.0070.0096.76
4.3.50.0040.0126.75
4.3.40.0040.0146.71
4.3.30.0010.0136.09
4.3.20.0020.0106.08
4.3.10.0030.0116.06
4.3.00.0070.01012.24

preferences:
56.56 ms | 400 KiB | 5 Q