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 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.0070.01018.43
8.3.50.0090.00722.19
8.3.40.0070.00718.96
8.3.30.0000.01519.09
8.3.20.0090.00020.04
8.3.10.0080.00022.09
8.3.00.0030.00622.34
8.2.180.0070.01518.79
8.2.170.0090.00622.96
8.2.160.0040.01121.02
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0030.00517.88
8.2.110.0060.00322.14
8.2.100.0060.00619.89
8.2.90.0050.00319.21
8.2.80.0080.00017.97
8.2.70.0080.00517.50
8.2.60.0040.00417.68
8.2.50.0000.00818.07
8.2.40.0050.00518.34
8.2.30.0030.00618.23
8.2.20.0040.00418.05
8.2.10.0030.00619.67
8.2.00.0000.00818.06
8.1.280.0070.00725.92
8.1.270.0000.00923.96
8.1.260.0030.00626.35
8.1.250.0060.00328.09
8.1.240.0040.00424.03
8.1.230.0040.00819.07
8.1.220.0060.00317.76
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0050.00317.54
8.1.180.0080.00018.10
8.1.170.0040.00418.77
8.1.160.0000.00822.05
8.1.150.0040.00418.91
8.1.140.0080.00017.62
8.1.130.0040.00417.85
8.1.120.0040.00417.65
8.1.110.0060.00317.66
8.1.100.0000.00717.58
8.1.90.0040.00417.61
8.1.80.0050.00217.49
8.1.70.0000.00717.59
8.1.60.0090.00017.75
8.1.50.0040.00417.63
8.1.40.0030.00517.73
8.1.30.0040.00417.86
8.1.20.0030.00617.84
8.1.10.0060.00317.68
8.1.00.0000.00817.69
8.0.300.0040.00418.77
8.0.290.0060.00317.16
8.0.280.0000.00818.36
8.0.270.0080.00017.20
8.0.260.0030.00316.98
8.0.250.0080.00017.00
8.0.240.0030.00517.13
8.0.230.0030.00417.18
8.0.220.0040.00417.08
8.0.210.0000.00717.10
8.0.200.0030.00317.10
8.0.190.0040.00416.98
8.0.180.0000.00817.03
8.0.170.0000.00817.11
8.0.160.0040.00416.89
8.0.150.0030.00317.10
8.0.140.0000.00716.91
8.0.130.0000.00613.49
8.0.120.0040.00417.04
8.0.110.0000.00716.96
8.0.100.0040.00417.09
8.0.90.0000.00817.02
8.0.80.0070.01117.11
8.0.70.0050.00316.91
8.0.60.0060.00317.04
8.0.50.0040.00416.93
8.0.30.0100.01317.06
8.0.20.0140.00917.40
8.0.10.0040.00417.29
8.0.00.0070.01017.04
7.4.330.0060.00015.17
7.4.320.0030.00316.84
7.4.300.0070.00016.83
7.4.290.0050.00216.83
7.4.280.0030.00316.66
7.4.270.0070.00016.70
7.4.260.0030.00316.71
7.4.250.0000.00716.66
7.4.240.0040.00416.81
7.4.230.0070.00016.56
7.4.220.0120.01516.91
7.4.210.0090.00616.86
7.4.200.0050.00316.64
7.4.190.0040.00416.98
7.4.160.0120.00416.73
7.4.150.0090.00917.40
7.4.140.0070.01017.86
7.4.130.0080.01016.68
7.4.120.0080.01216.85
7.4.110.0090.01516.57
7.4.100.0070.01016.72
7.4.90.0150.00816.62
7.4.80.0130.01319.39
7.4.70.0160.00616.62
7.4.60.0080.01216.55
7.4.50.0030.00616.55
7.4.40.0070.01022.77
7.4.30.0100.00516.74
7.4.00.0100.00715.02
7.3.330.0050.00513.38
7.3.320.0000.00613.33
7.3.310.0050.00316.46
7.3.300.0000.00816.47
7.3.290.0060.00916.40
7.3.280.0080.00916.46
7.3.270.0080.00917.40
7.3.260.0100.00716.45
7.3.250.0090.00916.58
7.3.240.0060.01116.69
7.3.230.0100.01016.49
7.3.210.0100.00716.59
7.3.200.0100.01019.39
7.3.190.0070.01016.65
7.3.180.0110.00816.64
7.3.170.0100.00616.45
7.3.160.0030.01316.49
7.3.120.0050.01315.02
7.3.110.0080.00915.12
7.3.100.0060.00815.07
7.3.90.0050.01015.08
7.3.80.0030.01015.09
7.3.70.0120.00314.99
7.3.60.0080.01014.69
7.3.50.0060.00814.80
7.3.40.0050.01014.77
7.3.30.0050.00914.97
7.3.20.0050.01016.75
7.3.10.0030.00716.53
7.3.00.0060.00716.72
7.2.330.0180.00916.91
7.2.320.0030.02016.87
7.2.310.0060.01316.88
7.2.300.0030.01716.75
7.2.290.0060.00916.63
7.2.240.0050.00915.36
7.2.230.0060.00615.18
7.2.220.0050.00915.26
7.2.210.0050.01115.38
7.2.200.0040.01515.30
7.2.190.0060.00915.31
7.2.180.0050.01115.36
7.2.170.0050.00915.30
7.2.160.0030.01015.25
7.2.150.0060.00717.05
7.2.140.0070.00717.01
7.2.130.0060.00816.86
7.2.120.0060.00817.00
7.2.110.0080.00817.06
7.2.100.0110.00416.93
7.2.90.0030.01117.07
7.2.80.0070.00817.09
7.2.70.0080.00717.11
7.2.60.0050.00816.76
7.2.50.0070.01117.07
7.2.40.0050.01317.03
7.2.30.0060.00617.23
7.2.20.0060.00717.14
7.2.10.0050.00917.19
7.2.00.0060.00617.96
7.1.330.0060.01116.17
7.1.320.0090.00515.99
7.1.310.0040.00916.04
7.1.300.0080.00815.90
7.1.290.0040.01015.93
7.1.280.0070.01016.04
7.1.270.0050.00515.77
7.1.260.0020.01415.79
7.1.250.0070.00915.97
7.1.100.0780.01016.53
7.1.70.0030.00617.34
7.1.60.0070.01719.82
7.1.50.0060.01617.21
7.1.00.0030.07722.35
7.0.200.0040.00416.89
7.0.140.0130.06322.21
7.0.110.0170.07019.96
7.0.100.0030.03319.91
7.0.90.0070.06020.00
7.0.80.0130.02719.96
7.0.70.0600.03320.09
7.0.60.0070.04319.68
7.0.50.0270.04319.89
7.0.40.0070.04019.75
7.0.30.0030.04019.81
7.0.20.0100.04319.72
7.0.10.0100.02719.71
7.0.00.0170.03719.67
5.6.280.0100.06320.98
5.6.260.0000.04020.51
5.6.250.0030.04320.65
5.6.240.0070.05720.71
5.6.230.0070.05320.51
5.6.220.0000.03720.64
5.6.210.0130.03720.40
5.6.200.0100.08020.56
5.6.190.0000.05320.59
5.6.180.0000.04720.57
5.6.170.0070.03720.68
5.6.160.0000.04320.63
5.6.150.0030.05720.46
5.6.140.0030.03320.70
5.6.130.0130.03320.63
5.6.120.0100.04020.59
5.6.110.0030.05020.64
5.6.100.0070.03020.69
5.6.90.0000.04720.68
5.6.80.0030.03719.94
5.6.70.0030.03719.83
5.6.60.0000.03719.92
5.6.50.0100.03020.06
5.6.40.0130.03719.93
5.6.30.0070.03319.91
5.6.20.0070.03019.98
5.6.10.0070.03019.89
5.6.00.0130.02319.99
5.5.380.0000.04317.66
5.5.370.0030.03717.59
5.5.360.0030.04017.53
5.5.350.0000.04017.54
5.5.340.0030.03718.25
5.5.330.0000.04718.10
5.5.320.0070.04017.87
5.5.310.0030.03718.25
5.5.300.0000.04317.89
5.5.290.0070.04018.13
5.5.280.0030.04318.12
5.5.270.0070.03718.11
5.5.260.0070.03318.16
5.5.250.0030.03317.66
5.5.240.0100.02317.43
5.5.230.0070.03717.50
5.5.220.0030.03317.53
5.5.210.0000.03717.22
5.5.200.0030.03317.60
5.5.190.0100.03017.16
5.5.180.0100.03017.21
5.5.160.0030.03317.48
5.5.150.0200.02017.23
5.5.140.0100.03017.18
5.5.130.0030.03717.48
5.5.120.0000.03317.19
5.5.110.0000.03717.44
5.5.100.0070.03017.51
5.5.90.0070.02717.11
5.5.80.0000.03317.35
5.5.70.0070.03017.41
5.5.60.0030.03017.25
5.5.50.0000.03717.13
5.5.40.0070.03317.37
5.5.30.0000.03317.50
5.5.20.0030.03317.08
5.5.10.0000.04317.33
5.5.00.0030.03717.34
5.4.450.0130.05319.50
5.4.440.0130.05719.45
5.4.430.0030.04019.40
5.4.420.0100.03319.43
5.4.410.0070.03019.14
5.4.400.0030.04019.12
5.4.390.0000.04319.04
5.4.380.0030.03719.10
5.4.370.0030.03319.18
5.4.360.0000.03719.04
5.4.350.0030.03319.00
5.4.340.0030.03318.95
5.4.320.0030.03318.96
5.4.310.0070.03019.18
5.4.300.0000.03719.27
5.4.290.0000.03318.95
5.4.280.0000.04019.07
5.4.270.0030.03719.14
5.4.260.0070.03018.96
5.4.250.0000.03319.02
5.4.240.0070.03018.97
5.4.230.0130.02019.02
5.4.220.0000.03718.94
5.4.210.0070.03019.02
5.4.200.0100.02719.07
5.4.190.0070.02719.15
5.4.180.0130.02018.91
5.4.170.0130.03019.03
5.4.160.0030.03719.23
5.4.150.0030.03019.14
5.4.140.0030.04016.26
5.4.130.0070.03316.22
5.4.120.0070.03316.48
5.4.110.0070.03316.55
5.4.100.0100.03716.24
5.4.90.0000.03016.29
5.4.80.0070.02716.40
5.4.70.0030.03016.55
5.4.60.0070.02716.16
5.4.50.0070.02716.20
5.4.40.0000.03316.38
5.4.30.0100.02716.33
5.4.20.0030.03016.20
5.4.10.0070.03316.38
5.4.00.0070.03015.61
5.3.290.0000.04014.52
5.3.280.0070.03714.54
5.3.270.0030.03314.47
5.3.260.0070.03014.39
5.3.250.0030.03714.46
5.3.240.0000.03714.53
5.3.230.0030.03314.70
5.3.220.0030.03314.36
5.3.210.0070.03014.52
5.3.200.0030.03014.56
5.3.190.0000.03314.64
5.3.180.0030.03314.44
5.3.170.0030.03314.35
5.3.160.0030.03014.57
5.3.150.0000.04314.56
5.3.140.0100.03314.59
5.3.130.0000.03314.57
5.3.120.0070.03314.57
5.3.110.0130.03014.40
5.3.100.0000.03313.93
5.3.90.0030.03313.87
5.3.80.0000.03713.80
5.3.70.0000.03313.89
5.3.60.0070.03013.92
5.3.50.0030.03313.75
5.3.40.0030.03713.80
5.3.30.0030.03013.79
5.3.20.0000.05313.63
5.3.10.0070.05713.60
5.3.00.0100.03713.52
5.2.170.0000.02712.02
5.2.160.0030.02312.02
5.2.150.0030.03012.02
5.2.140.0070.04012.02
5.2.130.0000.02712.02
5.2.120.0000.06012.02
5.2.110.0070.02312.02
5.2.100.0000.03312.02
5.2.90.0030.02712.02
5.2.80.0000.03712.02
5.2.70.0000.04312.02
5.2.60.0030.02712.02
5.2.50.0070.03012.02
5.2.40.0030.03012.02
5.2.30.0070.02712.02
5.2.20.0100.03712.02
5.2.10.0070.02712.02
5.2.00.0000.03012.02
5.1.60.0000.02712.02
5.1.50.0030.02712.02
5.1.40.0030.02312.02
5.1.30.0000.02312.02
5.1.20.0030.02312.02
5.1.10.0000.02312.02
5.1.00.0030.02712.02
5.0.50.0000.03012.02
5.0.40.0030.02312.02
5.0.30.0030.02312.02
5.0.20.0000.01712.02
5.0.10.0030.01712.02
5.0.00.0000.03712.02
4.4.90.0030.01312.02
4.4.80.0030.01312.02
4.4.70.0030.01312.02
4.4.60.0000.01312.02
4.4.50.0000.01712.02
4.4.40.0030.02012.02
4.4.30.0030.01312.02
4.4.20.0000.01712.02
4.4.10.0000.01712.02
4.4.00.0030.02312.02
4.3.110.0030.01712.02
4.3.100.0030.02012.02
4.3.90.0000.03312.02
4.3.80.0000.02712.02
4.3.70.0100.02312.02
4.3.60.0030.01312.02
4.3.50.0030.01012.02
4.3.40.0000.02712.02
4.3.30.0000.01712.02
4.3.20.0000.01312.02
4.3.10.0030.01312.02
4.3.00.0000.01312.02

preferences:
48.69 ms | 401 KiB | 5 Q